為什么confirm沒有彈出
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> ??
? <script type="text/javascript"> ?
? ? function openWindow(){
? ? var msg=confirm("是否打開新的網(wǎng)頁");
? ? if(msg==true)
? ? {msg=prompt('打開',' http://idcbgp.cn/');
? ? ? ? window.open("http://idcbgp.cn/","_blank","width=400,height=500px,
? ? ? ? menubar=no,toolbar=no");
? ? }
? ? else{null}
? ? }
? ??
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2019-02-27
這樣子。
2019-02-27
2019-02-26
要寫兩個函數(shù)吧?