1.通过serialize()方式传递json数据

注意:前端html表单 name值应该为后台类中的字段名称 例如:<input  name="S_类字段名称" type='text'   />

1.1 js

 

var x = encodeURI(jQuery("#xmfs input,select,textarea").serialize());
jQuery.ajax({
       type: "POST",
       url: "../Handler/zHandler.ashx?Action=AddRew",
       data: x,
       success: function (datad) {
             alert("提交成功!");
       },
       dataType: "json"
});
js serialize()

相关文章:

  • 2022-01-22
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-02-28
  • 2022-12-23
  • 2021-05-20
  • 2021-04-04
相关资源
相似解决方案