How to Get Multiple Checkbox Values in jQuery

Example 1: Use the jQuery :checked selector

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>jQuery Get Values of Selected Checboxes -</title>
<script src=""></script>
$(document).ready(function() {
var languages = [];
$.each($("input[name='web']:checked"), function(){
alert("My languages Webs are: " + languages.join(", "));

<h3>Select your languages Webs:</h3>
<label><input type="checkbox" value="vuejs" name="web"> Vuejs</label>
<label><input type="checkbox" value="angularjs" name="web"> Angularjs</label>
<label><input type="checkbox" value="magento" name="web"> Magento</label>
<label><input type="checkbox" value="php" name="web"> PHP</label>
<label><input type="checkbox" value="javascript" name="web"> JavaScript</label>
<label><input type="checkbox" value="wordpress" name="web"> Wordpress</label>
<button type="button">Get Values</button>

I hope you get an idea about how to get all checked checkbox” value in jquery.


How to Get Multiple Checkbox Values in jQuery
1.15 GEEK