function openWindow(){
var kopen = confirm("打开对话框吗?");
if(kopen==true){
var say = prompt("请输入要打开的网址"," http://www.imooc.com");
if(say!=0){
window.open(say,'_blank','width=600px,height=500px,menubar=no,toolbar=no');
}
}
}
if(say != null)
问题上面那个乱了,看评论的那个代码,要怎么改呢?
unction openWindow(){ var kopen = confirm("要打开对话框吗?"); if(kopen==true){ var say = prompt("请输入要打开的网址"," http://www.imooc.com"); if(say!=0){ window.open(say,'_blank','width=600px,height=500px,menubar=no,toolbar=no'); } } }