点击按钮 不能运行= =
<!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 crel = confirm("Open a new window ?");
if(crel == true){
var prel = prompt("Input url:", "http://www.imooc.com");
window.open('prel', '_blank', 'width=400,height=500,menubar=no,toolbar=no');
}
else{
alert("hi");
}
openWindow();
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onClick="openWindow()" />
</body>
</html>