這樣寫正確嗎?
????function?openWindow(){
????????var?queren=confirm("是否打開網站?");
????????if(queren==true)
????????{
????????????var?wangzhi=prompt("請輸入網址:","http://www.xianlaiwan.cn");
????????????window.open('wangzhi','_blank','width=400px,height=500px,menubar=no,toolbar=no');
????????}
????????else{
????????????window.close();
????????}
????????
????????}
2015-02-17
為什么不能打開輸入的網址?
2015-02-17
? ? function openWindow(){
? ? ? ? var queren=confirm("是否打開網站?");
? ? ? ? if(queren==true)
? ? ? ? {
? ? ? ? ? ? var wzngzhi=prompt("請輸入網址:","http://www.xianlaiwan.cn");
? ? ? ? ? ? window.open('wangzhi','_blank','width=400px,height=500px,menubar=no,toolbar=no');
? ? ? ? }
? ? ? ? else{
? ? ? ? ? ? window.close();
? ? ? ? }
? ? ? ??
? ? ? ? }