2-7編程練習(xí),不知道哪里做的不對(duì)?求指導(dǎo)謝謝
??function?openWindow() ??{var?open=confirm("確定打開(kāi)么?"); ??if(open==true); ????{?var?cf=prompt("確認(rèn)要打開(kāi)http://idcbgp.cn,請(qǐng)輸入") ????????if(cf==http://idcbgp.cn); ????????{window.open(cf,"_blank","width=400px,height=500px,menubar=no,toolbar=no");} ????????else{ ????????????alert("重新輸入"); ????}else{ ????????alert("啦啦"); ????} ????}
2015-10-14
cf=prompt("確認(rèn)要打開(kāi)http://idcbgp.cn,請(qǐng)輸入","http://idcbgp.cn")
2015-10-12
網(wǎng)址加引號(hào)試試
function openWindow(){
????? var a = confirm('是否打開(kāi)?');
????? if(a){
??????? var b =? prompt("請(qǐng)輸入網(wǎng)址");
??????? if(b=='http://idcbgp.cn/'){
??????????? var open = window.open('http://idcbgp.cn/','_blank','width=400,height=500,menubar=no,toolbar=no');
?????????? ?
??????? }
????? }
??? }