jQuery异步提交表单

// 使用 jQuery异步提交表单
$('#userform').submit(function() {
jQuery.ajax({
url : '<%=basePath%>rqcode/generatec',
data : $('#userform').serialize(),
type : "POST",
beforeSend : function() {
$('#submitButton').hide();
$('#editRealMsgImg').show();
},
success : function() {
$('#submitButton').hide();
$('#editRealMsgImg').show();
}
});
return false;
});

posted on 2014-05-14 09:39  Ganymede505  阅读(211)  评论(0)    收藏  举报