use jQuery to get values of selected checkboxes

后端 未结 12 2707
旧巷少年郎
旧巷少年郎 2020-11-27 14:44

I want to loop through the checkboxgroup \'locationthemes\' and build a string with all selected values. So when checkbox 2 and 4 are selected the result would be: \"3,8\"

12条回答
  •  猫巷女王i
    2020-11-27 15:18

    Source - More Detail

    Get Selected Checkboxes Value Using jQuery

    Then we write jQuery script to get selected checkbox value in an array using jQuery each(). Using this jQuery function it runs a loop to get the checked value and put it into an array.

    
        
        
        
        Get Selected Checkboxes Value Using jQuery
        
        
        
        
            

    Select your location themes:


提交回复
热议问题