哪里錯(cuò)了?求解答
function openWindow(){ ? ? ? ??
????if(confirm("是否用新窗口打開網(wǎng)站?")){ ? ? ? ? ? ?
????????var url=prompt("請(qǐng)輸入要打開的網(wǎng)址:","http://idcbgp.cn/"); ? ? ? ? ? ?????????????????????window.open(url,"_blank","width=400px,height=500px,munebar=no,toolbar=no");?
? ? }else{} ??
?}?
2016-07-23
第一點(diǎn):冒號(hào)要用英文輸入,第二點(diǎn):是menubar不是munebar
2016-07-25
?function openWindow(){
? ? ? ? var a=confirm("是否打開窗口");
? ? ? ? if(a==true){
? ? ? ? ? ? ? window.open('http://idcbgp.cn','_blank','width=400','height=500','top=100px','left=0px','menubar=no,toolbar=no, status=no,scrollbars=yes');
? ? ? ? }
? ? ? ? else{
? ? ? ? ? ? var b=prompt("請(qǐng)輸入你要打開的網(wǎng)頁");
? ? ? ? ? ? if(b!=null){
? ? ? ? ? ? ? ? alert("你想打開的是"+b);
? ? ? ? ? ? }
? ? ? ? }
? ? ? ??
? ? ? ??
? ? ? ? }
2016-07-23
?function openWindow(){?
? ? var a=confirm("是否用新窗口打開網(wǎng)站?");
? ? if(a==true){ ? ? ? ? ? ?
? ? ? ? var url=prompt("請(qǐng)輸入要打開的網(wǎng)址:","http://idcbgp.cn/"); ?if(url=="http://idcbgp.cn/"){ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?window.open("http://idcbgp.cn/","_blank","width=400px,height=500px,munebar=no,toolbar=no"); }
? ? }else{window.close()} ??
2016-07-23
這里用了中文輸入法,空格大了,要輸入http://idcbgp.cn才對(duì)
2016-07-23
我試了一下你的代碼,沒發(fā)現(xiàn)有錯(cuò)誤啊,你試試換個(gè)瀏覽器跑一跑