?function openWindow(){??????????? var vunwen=confirm("是否打開新窗口?");??????????? if(vunwen==true){????????????? var tiwen=prompt("請輸入新網(wǎng)址:","http://idcbgp.cn/");????????????? window.open(tiwen,'_blank','width=400,height=500,menubar=no,toolbar=no');??????????? }??????????? else{??????????????? alert("你沒有打開新窗口");??????????? }??? }//在window.open(tiwen,'_blank','width=400,height=500,menubar=no,toolbar=no');這段代碼中,代碼可以運(yùn)行,將?tiwen改成 'http://idcbgp.cn/'也可以,但是將 tiwen改成 'tiwen' 便不能跳轉(zhuǎn)到新網(wǎng)頁,這是因為什么呢?
關(guān)于 window.open的問題?
智取啟辱
2017-04-26 23:10:28