有沒有大神來幫我解決一下下,拜托了
<script type="text/javascript"> ?
? ? funtion openWindow()
? ? {var open=confirm("是否打開新的網(wǎng)頁?");
? ? ?if (open==true)
? ? // 新窗口打開時(shí)彈出確認(rèn)框,是否打開
? ?{var url=prompt("通過輸入對話框,確定打開的網(wǎng)址","http://idcbgp.cn/");
? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ? if (url!=null)
? ? {window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
?else
{alert("再見!");}
} ??
else
{alert("再見!");}
? ? } ??
? ??
? </script>?
2016-08-02
var url=prompt("通過輸入對話框,確定打開的網(wǎng)址","http://idcbgp.cn/")
你這里的http://? 這個(gè)冒號是中文的 ? 換成英文就好
2016-08-02
? funtion openWindow() ??
是function, ?建議基礎(chǔ)知識掌握扎實(shí).
2016-08-02
function
2016-08-02
沒寫’_blank‘
2016-08-02
’_blank‘