ajax 向後臺如何傳遞數組參數

使用 traditional:true 屬性



$.ajax({
    type: "POST",
    url: url,
   traditional:true,
   data:{ gender:[0,1] },
   dataType: "json",
    async:false
   });



參考資料:  ajax 向後臺傳遞數組參數   http://www.studyofnet.com/news/966.html


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章