<script language="javascript"> <!-- function focusto(x){ document.frmlogin.elements(x).focus();}
function checkdata(){ if(document.frmlogin.y_name.value==""){ alert("请输入姓名!"); focusto(0); return false;} if(document.frmlogin.y_name.value.length<2||document.frmlogin.y_name.value.length>12){ alert("您输入的姓名格式不正确!"); focusto(0); document.frmlogin.y_name.select(); return false;}
if(document.frmlogin.y_sex.value==""){ alert("请选择你的性别"); focusto(1); return false;} if(document.frmlogin.y_age.value==""){ alert("请填写你的年龄"); focusto(2); return false;} if(document.frmlogin.y_address.value==""){ alert("请填写你的家庭地址"); focusto(4); return false;} if(document.frmlogin.y_person.value==""){ alert("请填写你的联系电话"); focusto(6); return false;} if(document.frmlogin.y_person.value==""){ alert("请选择你的联系人"); focusto(8); return false;} if(document.frmlogin.classname.value==""){ alert("请选择你的专业"); focusto(10); return false;}
return true; } //--> </script>
onSubmit="return check(this)" |