麻烦大神帮我看看这个代码为什么无法弹出窗口,
代码如下
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>confirm</title>
<script type="text/javascript">
function rec(){
var mymessage=confirm("完成性别确认");
if (mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
}
</script>
</head>
<body>
<input name="button" type="button" onclick="rec()" value="点击我,弹出确认窗口"/>
</body>
</html>