yangmengdx3

 

/**
 * 将form表单元素的值序列化成对象
* param: form jquery form对象
*/ var serializeObject = function(form) { var o = {}; $.each(form.serializeArray(), function(index) { if (this[\'value\'] != undefined && this[\'value\'].length > 0) {// 如果表单项的值非空,才进行序列化操作 if (o[this[\'name\']]) { o[this[\'name\']] = o[this[\'name\']] + "," + this[\'value\']; } else { o[this[\'name\']] = this[\'value\']; } } }); return o; };

 

分类:

技术点:

相关文章:

  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2021-05-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-13
  • 2021-12-23
  • 2021-06-17
  • 2021-12-23
  • 2021-10-14
  • 2021-12-13
相关资源
相似解决方案