我哪里出問題了,怎么打開窗口要求不起作用呢?
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>? ?
? <script type="text/javascript"> ?
?? ?
??? function openWindow(){
??????? var message=confirm("請確認是否真的需要打開");// 新窗口打開時彈出確認框,是否打開
??????? var chuankou=prompt("請輸入需要打開的網址:,http://www.xianlaiwan.cn");// 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
??????? if (message==true)
??????? {
??????????? window.open("http://www.xianlaiwan.cn","_blank","width:400px,height:500px,menubar=no,toolbar=no") //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
??????? }
??????? else
??????? {
??????????? alert("請返回重新提交");
??????? }
????? ?
??????? }
? </script>
?</head>
?<body>
?? ?? <input type="button" value="新窗口打開網站" onclick="openWindow()" />
?</body>
</html>
2015-07-07
var chuankou=prompt("請輸入需要打開的網址:",http://www.xianlaiwan.cn");? // "每個字符串用雙引號包含"
2015-07-07
打得開呀~~應該是你瀏覽器設置了。