function checkNewEmail(){
var flat=false;
var re_email=new RegExp("\\w+@\\w+\\.\\w+\\.?\\w*");
var newEmail=$("#email_new").val();
if(re_email.test(newEmail)){
$.ajax({
type:"post",
dataType:"json",
async:false,//同步方式
url:"existEmail?email="+newEmail,
success:function(dataResult){
if(dataResult=="true"){
$("#emial-error").text("邮箱已注册。");
flat=false;
}else{
flat=true;
}
}
});
}else{
$("#emial-error").text("邮箱格式不正确。");
return false;
}
return flat;
}