1 serializeObject = function (form) { /*将form 表单元素的值序列化*/
 2     var obj = {};
 3     $.each(form.serializeArray(), function (index) {
 4         if (obj[this['name']]) {
 5             obj[this['name']] = obj[this['name']] + "," + this['value'];
 6         } else {
 7             obj[this['name']] = this['name'];
 8         }
 9     });
10 };
//使用方法

serializeObject("这里传form元素对象");

相关文章:

  • 2021-09-12
  • 2021-07-06
  • 2021-06-11
  • 2021-12-12
  • 2021-08-12
  • 2021-11-28
  • 2021-12-10
  • 2021-05-05
猜你喜欢
  • 2021-06-09
  • 2021-05-23
  • 2022-02-24
  • 2021-11-16
  • 2021-10-08
  • 2021-05-17
相关资源
相似解决方案