编程训练为啥不好使,大神帮我看看
<!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 newtage=confirm("是否打开网该网址?");
if(newtage==true)
{var needtage=prompt("输入网址","http://www.imooc.com/");}
if(needtage!=null)
{window.open("needtage","_blank","width=400px,height=500px,menubar=no,toolbar=no")}
else
{alert(thanks)}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>