為什么我做的打不開 http://idcbgp.cn/????點擊確定后直接就彈出取消的窗體

Smile_0020
2014-07-01
3 回答
舉報
0/150
提交
取消
2014-07-01
舉報
2014-07-03
FFLY的答案正確,可以采用。
2014-07-02
//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。 if(url==true){ window.open(url,'_blank','width=400px,height=400px,menubar=no,toolbar=no'); //你open的地址寫成了url,當然打不開
2014-07-01
你在script 里面的代碼這樣寫 // 新窗口打開時彈出確認框,是否打開 var affirm=confirm("是否打開新窗口?"); // 通過輸入對話框,確定打開的網(wǎng)址,默認為 http://idcbgp.cn/ if(affirm==1){ var url=prompt("打開網(wǎng)址為","http://idcbgp.cn"); //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。 if(url){ window.open(url,'_blank','width=400px,height=400px,menubar=no,toolbar=no'); }else{ alert("已經(jīng)取消了"); } } }