卡在這節課三天了...
唉,真難搞啊,剛才還會彈出confirm,,這會連confirm都進不去了,有大神在嗎,我已經卡在這三天了...
function?openWindow()??? {var?open=confirm("確定打開嗎");??? if(open==true){??????? var?url=prompt("打開下面網址","http://www.xianlaiwan.cn/");??? if(url!=null)??? {window.open('http://www.xianlaiwan.cn/','_blank',width=500px,height=400px)}?????};??? else??? {return;}??? else??? {return;}?? }
2015-02-08
function openWindow(){
?? ?var open=confirm("確定打開嗎?");
?? ?if(open==true){
?? ??? ?var url=prompt("打開下面網址","http://www.xianlaiwan.cn/");
?? ??? ?if(url!=null){
?? ??? ??? ?window.open("http://www.xianlaiwan.cn","_blank","width=500px,height=400px");
?? ??? ?}else{
?? ??? ??? ?return false;
?? ??? ?}
?? ?}else{
?? ?return? false;
?? ?}
}
openWindow();
第一? 你的open中第三個參數幾個加引號
第二 代碼最好美觀點 要有序 這樣別人也好