| 123456789101112131415161718192021222324252627 |
- function sendCode(){
- var userName = $("#userName").val();
- var phone = $("#phone").val();
- var param = {"userName":userName,"phone":phone};
- sendAsyncAjax(param,"loadCode.do?type=loadCode","text",process);
- }
- function process(data){
- $("#time").val(data);
- }
- function validateData(){
- var rs = $.validate({name:"userName",model:[{type:"require",msg:"用户不能为空!",msgBox:"userName_msg"}]});
- rs &= $.validate({name:"phone",model:[{type:"require",msg:"电话号码不能为空!",msgBox:"phone_msg"}]});
- rs &= $.validate({name:"code",model:[{type:"require",msg:"验证码不能为空!",msgBox:"code_msg"}]});
- rs &= $.validate({name:"password",model:[{type:"require",msg:"新密码不能为空!",msgBox:"password_msg"}]});
- rs &= $.validate({name:"password1",model:[{type:"require",msg:"确认密码不能为空!",msgBox:"password1_msg"}
- ,{type:"equals",name2:"password",msg:"确认密码与新密码不一致!",msgBox:"password1_msg"}]});
- return rs;
- }
- function loadCode(){
- var phone = $("#phone").val();
- if(phone==""){
- alert("请输入电话号码!");
- }else{
- sendCode();
- }
- }
|