不可以这么输入吗????
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>prompt</title>
<script type="text/javascript">
function rec(){
var score;
score=prompt("你的男生还是女生")
if(score==男)
{
document.write(“你好,帅哥!”);
}
else if(score="女")
{
document.write("你是美女吗");
}
}
else
{
document.write("请输入你的性别")
}
</script>
</head>
<body>
<input type="button" name="botton" onclick="rec()" value="惦记我吧,骚年" />
</body>
</html>