新窗口打開有反應(yīng) prompt沒反應(yīng)了……
?function openWindow(){
? ? ? ? var open=confirm("是否打開?");// 新窗口打開時彈出確認(rèn)框,是否打開
? ? ? ? if (open==true){
? ? ? ? ? ? news=prompt("確定打開的網(wǎng)址","http://idcbgp.cn/"); // 通過輸入對話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ? ? ? ? ? if (news!=null){
? ? ? ? ? ? ? ? window.open('http://idcbgp.cn/','width=400px','height=500px','menubar=no','toolbar=no');? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ? ? ? ? ? else {
? ? ? ? ? ? ? ? alert("打開錯誤!");
? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? else {
? ? ? ? ? ? alert("打開錯誤!");
? ? ? ? }
? ? ? ? }
? ? }
點(diǎn)擊否也是無反應(yīng)……
2017-10-04
你沒有定義news這個變量。
2017-09-23
定義news