function getNextVerifyCode(){ $("verifycodeImg").src = "../verifycode?rand=" + new Date().getTime(); event.returnValue = false; } //验证查询输入项 function submitData(obj){ var reg = /[\u4e00-\u9fa5]+/g; var name=$('name').value; var cxh=$('cxh').value; var yzm=$('yzm').value; if(name==''){ alert("请输入查询用户名称"); return false; }else if(!reg.test(name)){ alert("用户名称必须是汉字"); return false; } else if(cxh==''){ alert("请输入查询编码"); return false; } else if(isNaN(cxh)){ alert("查询编码必须是数字"); return false; } else if(yzm==''){ alert("请输入验证码"); return false; } else if(isNaN(yzm)){ alert("验证码必须是数字"); return false; } obj.action='request_dispatch.jsp?url=applyform_query_dowith.jsp'; return true; obj.submit(); } /* function submitData(){ var applyerTypeDesc = $('personType').checked ? "姓名" : "法人/其他组织"; var aCheckArray = [['applyerName', applyerTypeDesc],['queryCode', "查询号"], ['rand', "验证码"]]; for (var i = 0; i < aCheckArray.length; i++){ if($F(aCheckArray[i][0]).trim() == ""){ $alert("请输入" + aCheckArray[i][1] + "!", function(){ $dialog().hide(); setTimeout(function(){ $(aCheckArray[i][0]).focus(); }, 100); }); return; } } //验证一下验证码是否正确 new Ajax.Request("check_verifycode.jsp", { method : 'get', parameters : "RAND=" + $F('RAND'), onComplete : function(transport){ var result = transport.responseText.trim(); if(result == 'false'){ $alert("输入的验证码错误!", function(){ $dialog().hide(); setTimeout(function(){ $('rand').focus(); }, 100); }); }else{ var frmData = $('frmData'); frmData.action = frmData.action + "&RAND=" + $F('RAND'); $('frmData').submit(); } } }); } */ function selectApplyerType(applyerType){ Element.update('nameTips', applyerType == '1' ? "姓名:" : "法人/其他组织:"); }