為什么我的網頁打不開
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>close()</title>
? <script type="text/javascript">
? function rec()
? {
? var mywin=confirm("是否打開新窗口")
if(mywin==true)
{ var Open;
Open=prompt("請輸入網址","http://www.xianlaiwan.cn/")}
if(Open!=null)
{
window.open('Open','_blank','width=400px,height=500px,menubar=no,toolbar=no') ;
}
else
{
alert("再見")
}
? }
? </script>
</head>
<body>
<input name="button" type="button" onClick="rec()" value="open"/>
? ?
</body>
</html>
點擊打開網頁的時候??跳出來的是Open,而不是輸入的網址
2016-05-03
第一個參數是url,直接輸入url就可以了
2016-05-03
window.open('Open','_blank','width=400px,height=500px,menubar=no,toolbar=no') ;這一行有問題,第一個參數不應該加引號