Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

test if multiple checkboxes are checked jquery

if($('input[name="make[]"]:checked').length > 0){ console.log('One or more checkboxes are checked'); }
Comment

Jquery get multiple checked values from checkbox

//This are the list of checkbox(2 selected, 2 unselected)
<input name="numchec"  type="checkbox" value="1" checked/>
  <input name="numchec"  type="checkbox" value="2" />
  <input name="numchec"  type="checkbox" value="3" checked/>
  <input name="numchec"  type="checkbox" value="4" />
  
 //Jquery Code
 
 $(document).ready(function(){
     var data=$('input[name=numchec]:checked').map(function(err, el) {
      			return $(el).val();
  			}).get();
     alert(data)
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: Javascript Regex for non-negative numbers 
Javascript :: material ui color background 
Javascript :: package json scripts multiple commands 
Javascript :: Angular version chrome console 
Javascript :: difference between two dates in js 
Javascript :: javascript get query parameter 
Javascript :: us phone number regex 
Javascript :: add active class to li onclick react 
Javascript :: react useref 
Javascript :: object to array javascript 
Javascript :: toggle class onscroll hook react 
Javascript :: js obj getting count of properties 
Javascript :: Internet Speed Checker JavaScript 
Javascript :: json multiple records 
Javascript :: ajax done 
Javascript :: javascript last character 
Javascript :: vue prop string or number 
Javascript :: vue cli - Uncaught SyntaxError: Unexpected token < 
Javascript :: nextjs check production or development environment 
Javascript :: check url with javascript 
Javascript :: extract value from array of objects javascript 
Javascript :: js events 
Javascript :: falsy value javascript 
Javascript :: trigger input javascript 
Javascript :: upload multiple files axios 
Javascript :: jquery set input value 
Javascript :: lazy react 
Javascript :: javascript url check 
Javascript :: how to setup atom for javascript 
Javascript :: change span value javascript 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =