请大神看一下我哪里错了,谢谢。为什么打不开?
<!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 mywin=window.open("www.hao123.com");
var pages = confirm("是否打开网页?");
if(pages == true){
window.open('www.hao123.com','_blank','width=400,height=500,menubar=no,toolbar=no');
alert("页面已打开~");
}
else{
mywin.close()
alert("页面已关闭");
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>