怎么能够控制注册提交??!!小弟百拜跪谢高手!!!
我写检验用户信息输入是否填写完整的方法实现。
我是这么做的,先是每个信息输入的时候有合法性的判断,分别为function a ,b,c,方法都用的是返回真或假,
在最后为了防止必要信息填写不完整,我就写了一个再次检验前面方法 A ,如下:
function regCheck() { check_UserName(); if(!check_UserName_bool || $("text_UserName").value =="") { $("text_UserName").focus(); return false; } check_UserPWD1(); if(!check_UserPWD1_bool|| $("text_UserPWD1").value =="") { $("text_UserPWD1").focus(); return false; } check_UserPWD2(); if(!check_UserPWD2_bool) { $("text_UserPWD2").focus(); return false; } alert("验证时 Email:" + check_UserName_bool); if(!check_UserEmail_bool || $("text_UserEmail").value =="") { $("text_UserEmail").focus(); return false; } check_ValidCode(); if(!check_ValidCode_bool) { $("text_ValidCode").focus(); return false; } return true; }