var url="";
function openWindow(){
if(window.confirm("是否确定")==true)
{
url=window.prompt("请输入网址","http://www.imooc.com/");
window.open(url,"_blank","width=400px","height=500px","toolbar=no","scrollbars=no");
}
}
window.open不是所有浏览器都兼容的很好的
参数字符串整体用引号引起来,里面的每一项用逗号隔开就行了:window.open(url,'_blank','width=400,height=500,toolbar=no,scrollbars=no');