大神帮忙找下错误,自己掌握的太少了~
<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
<script type="text/javascript">
function openWindow()
{
var su=confirm("是否打开?");
if(su==true)
{
var a=prompt("请输入网址" "http://www.imooc.com");
if(a!=null)
window.open('a','_blank','width=400,height=500,toolbar=no,menubar=no');
else
window.open('http://www.imooc.com','_blank','width=400,height=500,toolbar=no,menubar=no')
}
}
</script>
</body>
</html>