這段代碼改了許多次就是不知道哪出錯了,求正解。。。
? // 新窗口打開時彈出確認框,是否打開
?function love(){
? ? ?var damaitou=confirm("是否打開");
if(damaitou==ture)
? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認為 http://idcbgp.cn/
?{var dalin= prompt("請您輸入網(wǎng)址","http//idcbgp.cn");
if(dalin==null)
? ?{alert("zai jian.");}?
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
else
? ?{window.open(dalin,'_top','width=400,height=500,menubar=no,toolbar=no');}
? ? }
else
{alert("結(jié)束!謝謝您的使用!");}
?}?
2015-05-16
大兄弟,你這代碼。。。damaitou==ture?damaitou==true,alert("結(jié)束!謝謝您的使用!");?這里你用了中文符號;