jQuery将form表单的数据封装成json对象

/** * 自动将form表单封装成json对象 */ $.fn.serializeObject = function() { var o = {}; var a = this.serializeArray(); $.each(a, function() { if (o[this.name]) { if (!o[this.name].push) { o[this.name] = [ o[this.
posted @ 2019-12-19 10:36  Ai-Long  阅读(2499)  评论(0编辑  收藏  举报