關于window.open的疑問
為什么這樣不行?點擊按鈕確定,并沒有打開網頁
function openWindow(){
? ? ? ? var openp = confirm("shifoufakai ?");
? ? ? ? if (openp == ture)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? window.open('http://www.xianlaiwan.cn/' , '_black','menubar=no','toolbar=no');
? ? ? ? ? ? }
? ? ? ? else
? ? ? ? ? ? window.close();
? ? ? ? }
? ??
2016-08-26
? ? ? ? ? ?去掉 window.close();,因為這樣會產生邏輯矛盾。寫成return試試
2016-08-26
window.open()的第三個參數要放在一個引號內,用,隔開
2016-08-26
true
2016-08-26
對不起看錯了
檢查一下
_blank ?ture
2016-08-26
樓上回答的應該是對的吧
2016-08-26
function少了}
else少了{