Passing an array of values in an ASP.NET jQuery AJAX POST

前端 未结 3 1131
执念已碎
执念已碎 2020-12-10 23:27

I have a ListBox on my page, and I\'d like to make an AJAX post containing all the selected items. Here\'s my code:

$(\'#btnSubmit\').click(function() {
             


        
3条回答
  •  孤城傲影
    2020-12-10 23:47

    Pass it in the rest way. a=1&a=2&a=3 You may use jQuery serialize() http://api.jquery.com/serialize/

提交回复
热议问题