大家帮我哪里错了,不弹出对话框
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>自制网页打开</title>
</head>
<body>
<script type="text/javascript">
function rec(){
var casmo=confirm("老郭,你喜欢我嘛?");
if(casmo==true)
{
document.write("嘿嘿,走吧,我们回家。");
}
else
{
document.write("确定,不要在考虑一下嘛?");
}
}
</script>
</body>
</html>