為什么不能出來我輸入的字
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="點擊我,彈出確認對話框" />
</body>
</html>
2017-03-10
if條件語句后沒有分號
2017-03-10
if(mymessage==true); ? ?去掉分號;寫代碼一定要注意標點符號!?。。。?!
2017-03-10
要用英文的標點。
2017-03-10
if(mymessage==true); 不要這個分號!和注意后面 document.write("你好man哦!");與?document.write("水貨!"); 中分號的輸入狀態(tài) 在英文下輸入。
2017-03-10
代碼在英文狀態(tài)下輸入!?