怎么让在直接在表单上输出年龄直接得出结果
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>if...else</title>
<style>
.con{
width:100px;
high:20px;
}
</style>
<script type="text/JavaScript">
function rec()
{
var myage ="rec";//赵红的年龄为99
myage=45;
if(myage<=44)
{ document.write("青年");}
else if(myage<=59)
{document.write("中年人");}
else if(myage<=89)
{document.write("老年人");}
else
{document.write("长寿老年人");}}
</script>
</head>
<body>
<input class="con" name="button" type="number" value=""/><br>
<input name="button" type="button" onClick="rec()" value="请输出你的年龄" />
</body>
</html>