ajax post 时 form数据serialize()

         $.post(UrlAddData, $(".AddForm").serialize(),
             function (data) {
                 if (data.result) {
                     $.ligerDialog.success("保存成功!");
                     window.parent.$("#maingrid").ligerGrid().reload();
                     frameElement.dialog.close();
                 } else {
                     $.ligerDialog.error(data.msg);
                 }
             }); //post

  

$(".AddForm").serialize()  将 form 里的html元素,序列化为字符串。 
原文地址:https://www.cnblogs.com/starluck/p/4044774.html