function openWindow()
{
var new=confirm("是否在新窗口打开");
if(new==true)
{
var url=prompt("请输入网址","http://www.imooc.com/");
window.open(url,"_block","width=400px,height=500px,menubar=no,toolbar=no");
}
}
额,看出来了,是你变量名搞错了,不能用new,new是关键字
window.open(url,"_block","width=400px,height=500px,menubar=no,toolbar=no");里面不是双引号,是单引号吧