為什么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("是否打開新的網頁");
? ? if(msg==true)
? ? {msg=prompt('打開',' http://www.xianlaiwan.cn/');
? ? ? ? window.open("http://www.xianlaiwan.cn/","_blank","width=400,height=500px,
? ? ? ? menubar=no,toolbar=no");
? ? }
? ? else{null}
? ? }
? ??
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網站" onclick="openWindow()" />?
?</body>
</html>
2019-02-27
這樣子。
2019-02-27
2019-02-26
要寫兩個函數吧?