欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

js+springMVC 提交數(shù)組數(shù)據(jù)到后臺(tái)的實(shí)例

 更新時(shí)間:2019年09月21日 16:17:41   作者:```...簡(jiǎn)單點(diǎn)  
今天小編就為大家分享一篇js+springMVC 提交數(shù)組數(shù)據(jù)到后臺(tái)的實(shí)例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧

1.ajax 代碼

var ids =new Array();
$.ajax({
  type: "POST",
  url: "/user/downReport",
  dataType: "html",
  traditional: true,
  data:{
    downReportArray:ids
  },
  async: true,
  success: function (data) {
    if(data.code==200){
      console.log("正在打包...")
    }
  }
});

2.后臺(tái)接收

  @RequestMapping(value = "/downReport", method = {RequestMethod.POST})
  @ResponseBody
  public Object downReport(@RequestParam(value = "downReportArray") Long[] downReportArray,HttpServletRequest request ) throws Exception {
     ...
  }

以上這篇js+springMVC 提交數(shù)組數(shù)據(jù)到后臺(tái)的實(shí)例就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論