求指点哪错了?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>close()</title>
<script type="text/javascript">
function chi(){
var flag=confirm("是否打开百度?");
if(flag)
{
window.open('http://www.baidu.com','_blank')
}
</script>
</head>
<body>
<input type="button" name="button" value="anniu" onClick="chi()"/>
</body>
</html>