在一個(gè)函數(shù)中調(diào)用另一個(gè)函數(shù) 我調(diào)用不了 在db里調(diào)試的結(jié)果跟在慕課網(wǎng)里的結(jié)果不一樣
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>window.open</title>
<script type="text/javascript">
function op(){
? ? var a=confirm("你喜歡電音嗎?");
? ? if(a==true){
? ? ? ? a=wopen();
}else{
? ?a=prompt("你喜歡什么?");
}
return a;
}
? function Wopen(){
? ? ? var aa=op();
? ? ? var message= confirm("確定嗎,再給你一次機(jī)會(huì)!")
? ? ??
? ? ? if(message==true){
? ? ? ? ? alert("請享受此時(shí)此刻");
? ? ? ? ? window.open('http://www.dj97.com','_blank','width=1366,height=768,menubar=yes,toolbar=yes, status=yes,scrollbars=yes');
? ? ? }else{
? ? ? ? ? alert(" 你輸了,飲酒,靚女");
? ? ? ? ??
? ? ? }
? }?
</script>
</head>
<body>
? ? <input name="button" type="button" onClick="Wopen()" value="想你的耳朵懷孕嗎" >
</body>
</html>
2017-05-14
看不懂你這是什么調(diào)用??兩個(gè)函數(shù)調(diào)用不應(yīng)該是這樣的嗎?
函數(shù)op();函數(shù)Wopen()
先定義兩個(gè)函數(shù):
function op(){};
function Wopen(){};
然后op()中調(diào)用Wopen():
function op(){
Wopen();
};
你這個(gè)啥意思?互相調(diào)用?
2017-05-14
懂了,原來if語句不能判斷漢字
2017-05-14
你這個(gè)是要實(shí)現(xiàn)什么效果呢?