AJAX送信アレイ型パラメータ

$アヤックス({ 
               タイプ: "ポスト" 
               伝統的な:
               データ:{編曲:編曲}、
               URL: "$ {pageContext.request.contextPath} /顧客/ deleteById" 
               データ型: "JSON" 
               成功:関数( MSG){ 
                 場合(msg.code == 200 ){ 
                     window.location.href = "$ {pageContext.request.contextPath} /顧客/ findAllの" ; 
                 } { 
                     警告( "删除失败" ); 
                     window.location.href= "$ {pageContext.request.contextPath} /顧客/のfindAll" 
                 } 


               } 


控制层代码:
@RequestMapping( "deleteById" 
    @ResponseBody 
    パブリックマップの<string、オブジェクト> deleteById(String []型ARR){ 
        マップの<string、オブジェクト>マップ= 新しい HashMapの<> ();
        ブール B = customerService.deleteById(ARR)。
        もし(B){ 
            map.put( "コード"、200 ); 
        } { 
            map.put( "コード"、500 );
       
    }

おすすめ

転載: www.cnblogs.com/ych961107/p/12022973.html