真的不知道哪里不對了
function openWindow()
? {
? ?var ask=confirm("真的要打開嗎?")
if(ask==ture)
{
? ? var ag=prompt("確認一下","idcbgp.cn")
? ? if(ag!=null)
? ? ?window.open('http://idcbgp.cn','_blank','width=400,height=500,menubar=no,toolbars=no')
? ? ?else
? ? ?alert("拜拜")
}
?
?else
?alert("再見")
2019-02-10
你的函數(shù)沒有寫完整吧,格式很亂啊,還有你的if判斷,格式也是不對的,肯定生效不了。
if(條件){執(zhí)行代碼塊}else{否則執(zhí)行的代碼塊。}