办什么验证出问题了啊
<script language="javascript">function yanzheng()
{
var ddon=true;
if (reg.user_name.value=="")
{
ddon=false;
alert("请输入用户名");
reg.user_name.focus();
}
else if (reg.user_password.value=="")
{
ddon=false;
alert("请输入密码");
reg.user_password.focus();
}
else if (reg.user_sex.value=="")
{
ddon=false;
alert("请输入性别");
reg.user_sex.focus();
}
else if (reg.user_age.value=="")
ddon=false;
alert("请输入年龄");
reg.user_age.focus();
}
return ddon;
}
</script>
<form id="form1" name="reg" method="post" action="index.asp" onsubmit="return yanzheng();">
用户名:
<label>
<input type="text" name="user_name" />
</label>
<p>
<label>
密码:
<input type="text" name="user_password" />
</label>
</p>
<p>
<label>
性别:
<input type="text" name="user_sex" />
</label>
</p>
<p>
<label>年龄:
<input type="text" name="user_age" />
</label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
<label>
<input type="reset" name="Submit2" value="重置" />
</label>
</p>
</form>