打開的網(wǎng)頁地址多了本地的路徑
function openWindow(){ var a=confirm('您確定要打開窗口嗎');? ?
? ?if(a==true){
var b=prompt('請輸入您打開的網(wǎng)址',' http://idcbgp.cn/'); ? ? ? ?
?? ?if(b!=null){ ?window.open(b,'_blank','width=400px,height=500px')
} ? } ? } 為什么我的代碼,最后打開的時候,地址欄是這樣http://localhost:63342/untitled/http%EF%BC%9A//idcbgp.cn/,多了本地的路徑
2016-05-10
window.open([URL], [窗口名稱], [參數(shù)字符串])
你的url為什么寫了一個prompt?
2016-05-10
我復制了你的代碼,打開沒本地的路徑啊