為什么不能出來我輸入的字
function rec(){
var mymessage=confirm("你是超人嗎?");
if(mymessage==true);
{?
? ? document.write("你好man哦!");
? ??
}
else
{?
? ? document.write("水貨!");
? ??
}
}
? </script>
</head>
<body>
? ? <input name="button" type="button" onClick="rec()" value="點(diǎn)擊我,彈出確認(rèn)對(duì)話框" />
</body>
</html>
2017-03-10
if條件語句后沒有分號(hào)
2017-03-10
if(mymessage==true); ? ?去掉分號(hào);寫代碼一定要注意標(biāo)點(diǎn)符號(hào)?。。。。?!
2017-03-10
要用英文的標(biāo)點(diǎn)。
2017-03-10
if(mymessage==true); 不要這個(gè)分號(hào)!和注意后面 document.write("你好man哦!");與?document.write("水貨!"); 中分號(hào)的輸入狀態(tài) 在英文下輸入。
2017-03-10
代碼在英文狀態(tài)下輸入!?