為什么我的網(wǎng)頁(yè)打不開(kāi)
<!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("是否打開(kāi)新窗口")
if(mywin==true)
{ var Open;
Open=prompt("請(qǐng)輸入網(wǎng)址","http://idcbgp.cn/")}
if(Open!=null)
{
window.open('Open','_blank','width=400px,height=500px,menubar=no,toolbar=no') ;
}
else
{
alert("再見(jiàn)")
}
? }
? </script>
</head>
<body>
<input name="button" type="button" onClick="rec()" value="open"/>
? ?
</body>
</html>
點(diǎn)擊打開(kāi)網(wǎng)頁(yè)的時(shí)候??跳出來(lái)的是Open,而不是輸入的網(wǎng)址
2016-05-03
第一個(gè)參數(shù)是url,直接輸入url就可以了
2016-05-03
window.open('Open','_blank','width=400px,height=500px,menubar=no,toolbar=no') ;這一行有問(wèn)題,第一個(gè)參數(shù)不應(yīng)該加引號(hào)