JavaScript打開新窗口時(shí),窗口地址為何不能修改
function openWindow(){ ? ?
?var tf= confirm("請問是否需要打開新窗口?"); ? ??
if(tf==true){ ? ? ? ?
?new_window=prompt("請輸入要打開的窗口網(wǎng)址"," http://yifanck.cn/"); ? ? ? ? window.open(new_window,'_blank','width=400,height=500,menubar=no,toolbar=no'); ? ? } ? ?
}?
怎么感覺有BUG? 為什么輸入網(wǎng)址的時(shí)候,填寫其他的網(wǎng)址后打開的還是默認(rèn)的網(wǎng)址?不能進(jìn)入用戶填寫的網(wǎng)址?
2018-01-04
你的默認(rèn)網(wǎng)址 “http://yifanck.cn/”中的冒號是中文符號。