ajax验证代码,验证通过提交表单
jQuery.ajax({
type : "post",
dataType: "json",
url : "form.php?op=check",
data :({'username':user_name,'password':pass_word}),
async:true,
success:function(data){
if(data['status'] == '1'){
jQuery("#top_from_login").submit();
}else{
jQuery("#top_from_login .login_error").html("用户名或密码错误,请重新输入").show();
}
}
});