html>
new documentfunction openWindow(){
// 新窗口打开时弹出确认框,是否打开
var opensure = confirm("are you sure open?")
// 通过输入对话框,确定打开的网址,默认为 http://www.imooc.com/
if(opensure==true){
var newwind = prompt("please enter the url","http://www.imooc.com")
//document.write(newwind+"
")
//window.open("http://www.imooc.com")
if(newwind!=null){
//document.write("here"+"
")
window.open("http://www.imooc.com","_blank",width=400,height=500,menubar=no)
//document.write("hi")
}
}
//打开的窗口要求,宽400像素,高500像素,无菜单栏、无工具栏。
}
代码如上,把menubar=no去掉就能打开,加上就打不开...