為什么“http://idcbgp.cn”不正確
function openWindow()
??? {
??????? var message=confirm("是否打開?")
??????? if(message==true)
???????? {var myurl=prompt("輸入打開的網(wǎng)址","http://www.baidu.com");
???????? window.open("myurl"_blank","width=400,height=500");
???????? }
??????? else
??????? document.write("not open");
?????? ?
??? }
2016-03-28
window.open 第一個(gè)URL參數(shù)不用加雙引號(hào),并且與第二個(gè)參數(shù)用逗號(hào)隔開
2016-03-27
錯(cuò)誤1:message==true 是比較兩個(gè)字符串是否相等 而你要判斷的是message的邏輯值是否為真,所以要用message=true
錯(cuò)誤2:你沒有理解prompt和window.open的用法