<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>window.open</title>
<script type="text/javascript">
function wopen() {
var liu= confirm("你要baidu吗?");
if(liu==ture)
{
window.open('http://www.baidu.com','_blank','width=300,height=400,menubar=no,toolbar=no,status=no,scrollbars=yes');
}
else
{
alert("1024");
}
}
</script>
</head>
<body>
<form>
<input name="button" type="button" onClick="liu()" value="点击我,打开新窗口!">
</form>
</body>
</html>
<input name="button" type="button" onClick="liu()" value="点击我,打开新窗口!">
应该是
<input name="button" type="button" onClick="wopen()" value="点击我,打开新窗口!">
是你定义的函数名