1. 程式人生 > >學習日記13、ajax同時提交from表單和多個參數

學習日記13、ajax同時提交from表單和多個參數

表單 reload log DC change AD UC sca col

if ($("form").valid()) {
$.ajax({
url: "@Url.Action("EditCusAndCusCard")",
type: "Post",
data: $("form").serialize()+"&"+
$.param({ entity: $("#Numbers").datagrid("getChanges", "inserted")}),//主要是通過一個&關鍵符號
dataType: "json",
success: function (data) {
if (data.type == 1) {
window.parent.frameReturnByMes("操作成功");
window.parent.frameReturnByReload(true);
window.parent.frameReturnByClose()
}
else {
window.parent.frameReturnByMes("操作失敗");
}

}
});

學習日記13、ajax同時提交from表單和多個參數