為什么我的顯示不出來對話框,哪里有錯嗎
<script type="text/javascript">?
???
??? function openWindow(){
??????? var message=confirm("是否打開對話框");//新窗口打開時彈出確認(rèn)框,是否打開
?? if (message="是")
? { window.open('http://idcbgp.cn/',
?? 'width=400','height=500',menubar=no);
? }
??? }
? </script>
?</head>
?<body>
?? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />
2017-03-21
if(message==true)
返回值只有true和false
還有注意“=”是賦值,“==”才是等
2017-03-21