用dw寫(xiě)代碼,在瀏覽器中點(diǎn)擊按鈕沒(méi)反應(yīng)
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>confirm</title>
? <script type="text/javascript">
? function rec(){
? ? var mymessage= confirm("你是女士?") ? ? ? ?;
? ? if(mymessage==true)
? ? {
? ? document.write("你是女士!");
? ? }
? ? else
? ? {
? ? ? ? document.write("你是男士!");
? ? }
? } ? ?
? </script>
</head>
<body>
? ? <input name="button" type="button" onClick="rec()" value="點(diǎn)擊我,彈出確認(rèn)對(duì)話框" />
</body>
</html>
2016-03-14
你的瀏覽器是不是設(shè)置了禁止窗口彈窗?
2016-03-14
是不是沒(méi)有保存,這段代碼我copy了下,可以用,有反應(yīng)