JavaScript入門第二章的應(yīng)用
var mystr; ? ? ? ? mystr = confirm("是否打開"); ? ? ? ? if(mystr==true) ? ? ? ? { ? ? ? ? ? ? var a = prompt("確定你要打開的網(wǎng)址","http://idcbgp.cn/"); ? ? ? ? ? ? window.open('http://idcbgp.cn/','_blank','width=400,height=500,menubar=no,toolbar=no') ? ? ? ? }else ? ? ? ? { ? ? ? ? ? } } 這個(gè)為什么不行
2016-03-06
? ?var mystr; ? ? ? ?
? ? mystr = confirm("是否打開");
? ? if(mystr==true){
? ? ? var a = prompt("確定你要打開的網(wǎng)址","http://idcbgp.cn/"); ?
? ? ? window.open('http://idcbgp.cn','_blank','width=400,height=500,menubar=no,toolbar=no'); ?
? ? ?}else{
? ? ?}?
這個(gè)是正確的,注意“;”、“,”要用英文的
2016-03-06
注意中英文符號,";"是中文的