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