标签:def bsp serial array col his rem fine this
//注意:获取之前 $("#id").removeAttr("disabled"); $.fn.serializeObject = function () { var o = {}; var a = this.serializeArray(); $.each(a, function () { if (o[this.name] !== undefined) { if (!o[this.name].push) { o[this.name] = [o[this.name]]; } o[this.name].push(this.value || ‘‘); } else { o[this.name] = this.value || ‘‘; } }); var $radio = $(‘input[type=radio],input[type=checkbox]‘, this); $.each($radio, function () { if (!o.hasOwnProperty(this.name)) { o[this.name] = ‘‘; } }); return o; };
自定义$('#form').serialize() var params = $('#xxx_form').serializeObject();
标签:def bsp serial array col his rem fine this
原文地址:https://www.cnblogs.com/hahajava/p/9044361.html