<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript">
function check(){
var name=document.form.name.value;
var age=document.form.age.value;
if (name.trim=="" || name=="" ){
alert("名称不能为空");
return false;
}
if (age.trim=="" || age=="" ){
alert("年龄不能为空");
return false;
}else{
return true;
}
}
</script>
</head>
<body>
<form action="Mymoney.asp" name="form" method="get" >
姓名:<input type="text" name="name" /><br>
年龄:<input type="text" name="age" /><Br>
<input type="submit" onClick="return check()" value="提交" />
</form>