为什么我的代码在打开这个网页之后,只要点击关闭窗口,会无限的再打开新的网页
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window对象</title>
<script type="text/javascript">
var string = confirm("欢迎来到慕课网");
function new_page(){
if(string==true)
{
window.open("http://www.hao123.com","_blank","height=400px,width:600px");
}
}
</script>
</head>
<body>
<form>
<input type="button" value="点击我,打开新窗口" onfocus="new_page()" />
</form>
</body>
</html>