alert(拜拜)不加引号属于啥呢,点取消就不会再出现窗口,也不会跳转页面
<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<script type="text/javascript">
function chuangkou(){
var kou = confirm("要打开此网页吗?");
if(kou==true)
{
window.open('http://www.imooc.com','_blank','width=400,height=500');
}
else
{
alert(拜拜);
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="chuangkou()" />
</body>
</html>