function chkRegThis(){ var email = Trim($("form#sendForm #user_name").val()); if(email == ""){ alert( "請填寫登入帳號 E-mail!" ); $("form#sendForm #user_name").focus(); return false; }else{ if(!checkEmail(email)){ alert("您所填寫的登入帳號,Email格式有誤,請重新填寫!"); $("form#sendForm #user_name").focus(); return false; } } //驗證碼 if( $("form#sendForm #code").val() == "" ){ alert("請填寫驗證碼!"); $("form#sendForm #code").focus(); return false; } $("form#sendForm submit").prop('disabled',true); $.ajax({ type: "POST", url: "ajax/member_forget.php", data: $("form#sendForm").serialize(), dataType: "json", cache: false, async: false, success: function(data) { if(data['status'] == "true"){ turn = true; alert('信件已寄送至您的信箱,請至註冊信箱收取認證信,謝謝!'); }else{ alert(data['msg']); turn = false; $("form#sendForm submit").prop('disabled',false); reSIImage(); $('#code').val(''); } } }); return turn; }