function openWindow()
{
var open=confirm("是否打开新窗口?");
if(open==true)
{
var url=prompt("please imput url","http://www.baidu.com");
if(url!=null) {window.open(url,'_blank',width=400,height=500,menubar=no,toolbar=no);}
else{alert("再见!");}
}
else{alert("bye-bye!");}
}
width=400,height=500,menubar=no,toolbar=no要用单引号引起来