為什么錯誤?
為什么錯誤?
function?openit() ?????{window.open('http://idcbgp.cn/','_blank','width?=?400,height=500,menubar=no,toolbar=no');} ???????? function?openWindow() ?????{ ????????var?open=confirm('確定是否打開http://idcbgp.cn/?'); ???????? ????????if(open==ture) ????????????{ ????????????????var?open2=prompt('確定打開下列網(wǎng)址?','http://idcbgp.cn'); ???????????????? ????????????????if(open2==ture) ????????????????????{openit();} ????????????????else ????????????????????{alert("再見!");} ????????????} ????????else ????????????{alert("再見!");} ????????}
2017-02-08
繼續(xù)繼續(xù)-。-,試完了function openWindow(){
??? if(confirm("確定是否打開http://idcbgp.cn/?")){
??? var open = prompt("確定打開下列網(wǎng)址?","http://idcbgp.cn");
??? if(open==true){
??? window.open(open,"_blank","width=400,height=500,menubar=no,toolbar=no");
???? }
??? else alert("再見!");
?}
??????? else alert("再見!");
}
? 可以這樣, if(open==true){w~~~~~?? w前面不能有空格。。。。 有空格true起不了作用 具體不懂解析 有沒大佬指教下。
2017-02-08
function openWindow(){
??? if(confirm("確定打開新窗口嗎?")){
?var hi = prompt("請輸入一個網(wǎng)址","http://idcbgp.cn/");?
??? window.open( hi,"_blank","toolbar=no, menubar=no, scrollbars=yes,? width=400, height=400");
??? }
??? else alert("88");
}
同為新手。。。中間再用IF ELSE也是出不來效果
2017-02-06
用英文的分號,不能用中文分號!