jquery - select all checkboxes with js array name

后端 未结 4 753
长发绾君心
长发绾君心 2021-02-02 10:31

I want to use a JQuery \"check all\" function in a form like this: http://jetlogs.org/jquery/jquery_select_all.html

My problem is I am generating my form from a php scr

4条回答
  •  青春惊慌失措
    2021-02-02 11:12

    Try using

    $('input[name="items[]"]')
    

    No need for @ and use ". Note that the selector outside quotes are '. Otherwise you might cause parse error.

提交回复
热议问题