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

how to get multiple checkbox value in jquery

//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 :: get hours and minutes and seconds from date in javascript 
Javascript :: javascript get last url segment 
Javascript :: javascript undefined check 
Javascript :: nodejs current timestamp unix 
Javascript :: js round 2 digits 
Javascript :: nestjs change httpcode inside function 
Javascript :: input onenter go to next input field javascript 
Javascript :: how to check consecutive characters in javascript 
Javascript :: vue watch props 
Javascript :: print table javascript 
Javascript :: google sheet app script 
Javascript :: Tribonacci Sequence in JavaScript 
Javascript :: count duplicate elements in array javascript 
Javascript :: limit characters display javascript 
Javascript :: insert into specific array index 
Javascript :: javascript array concat spread operator 
Javascript :: js sort numbers descending order 
Javascript :: Confirm the Ending 
Javascript :: javascript async fetch file html 
Javascript :: enzye check if it renders 
Javascript :: kamus bahasa inggris 
Javascript :: jquery remove duplicates from array 
Javascript :: how to remove a property from an object in javascript 
Javascript :: uncaught TypeError: $.jajax is not a function 
Javascript :: getcomputed style js 
Javascript :: read a file nodejs 
Javascript :: queue en js 
Javascript :: Use History React Router v5 app 
Javascript :: last week date js 
Javascript :: jquery event keycode 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =