How to send a checkbox group via ajax in jquery?

前端 未结 4 904
暗喜
暗喜 2021-01-14 07:39

I need to send a group of checkboxes (with some other data as well) via ajax in jquery.

What I\'ve done so far is:

var arr = $(\'#somediv input[type         


        
4条回答
  •  自闭症患者
    2021-01-14 08:42

    You may be looking for .serialize

    A more generic solution would be to have a form with all the parameters and then serialize it.

提交回复
热议问题