jquery的ajax提交form表单的两种方法小结(推荐)
方法一:
{
var AjaxURL= "../OrderManagement/AjaxModifyOrderService.aspx";
alert($('#formAddHandlingFee').serialize());
$.ajax({
type: "POST",dataType: "html",url: AjaxURL + '?Action=' + 'SubmitHandlingFee' + '&OrderNumber=' + $.trim($("#<%=this.txtOrderNumber.ClientID %>").val()),data: $('#formAddHandlingFee').serialize(),success: function (result) {
var strresult=result;
alert(strresult);
//加载最大可退金额
$("#spanMaxAmount").html(strresult);
},error: function(data) {
alert("error:"+data.responseText);
}
});
}
方法二:
});
}
);
<td>
</td>
<td>
</table>