為什么不能打開新窗口?
? <script type="text/javascript">??
? ? function openWindow(){
? ? // 新窗口打開時彈出確認(rèn)框,是否打開
? ? var open = confirm("是否打開新窗口");
? ? if(open==true){
? ? ? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ? ? ? var url = prompt("將要打開網(wǎng)址是?","http://idcbgp.cn/");
? ? ? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ? ? ? if(url!=null){
? ? ? ? ? ? window.open(url,'_blank','width=400,height=500,menubar=no,toolbar=no');
? ? ? ? }
? ? ? }
? }
? </script>?
2018-10-20
仔細(xì)看,他給的地址是錯誤的,http后面的冒號是中文字符