前面的確認(rèn)框和對(duì)話框都能正常彈出,但最后又出現(xiàn)了確認(rèn)框,就是沒(méi)有彈出網(wǎng)頁(yè),不知道為啥?
function openWindow(){
? ? ? ? var sure = confirm("確定打開(kāi)新的窗口?");
? ? ? ? if(sure == true){
? ? ? ? ? ?var op = prompt("確定打開(kāi)此網(wǎng)站?", "http://yifanck.cn/");
? ? ? ? ? ??
? ? ? ? ? ? if(op!=null){
? ? ? ? ? ? ? ? window.open(op,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');
? ? ? ? ? ? }
? ? ? ? ? ? else{
? ? ? ? ? ? ? ? alert("err2");
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? else{
? ? ? ? alert("err1");
? ? ? ?}
? ? }
2019-09-12
代碼沒(méi)有問(wèn)題,你再試試!
2019-09-12
你是不是點(diǎn)了阻止彈出窗口,,,,我這IE chrome edge測(cè)試了都沒(méi)問(wèn)題。。