<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<script type="text/javascript">
function openWindow(){
var choose=confirm("是否打开?");
if(choose==true)
{
var newurl=prompt("确定打开的网址","http://www.imooc.com");
}
if(newurl!==null)
{ window.open(newurl,'_blank','width=400,heigth=500,menubar=no,toolbar=no');
}
else
{
alert("sorry1!");
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>
var choose=confirm("是否打开?");
这一句分号错了,改成英文分号吧
var choose=confirm("是否打开?");