DEV Community


Posted on • Originally published at


How To Get Multiple Checkbox Value In jQuery

In this article, we will see how to get multiple checkbox values in jquery. Here, we will learn to get the selected checkbox values using jquery.

We will use the :checked selector for checkboxes and radio buttons. It can retrieve the selected value of the checkbox.

When clicking on the checkbox we will push the value in the array using the push() function.

So, let's see get selected checkbox values in jquery, multiple checkbox checked values in javascript, and how to get multiple checkbox values in jquery using an array.


<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>How To Get Multiple Checkbox Value In jQuery</title>
<script src=""></script>
        <h3>Select languages:</h3>
        <label><input type="checkbox" value="laravel" name="language"> Laravel </label>        
        <label><input type="checkbox" value="php" name="language"> PHP </label>        
        <label><input type="checkbox" value="jquery" name="language"> jQuery </label>
        <label><input type="checkbox" value="javascript" name="language"> JavaScript </label>
        <label><input type="checkbox" value="react" name="language"> React </label>
        <label><input type="checkbox" value="angular" name="language"> Angular </label>
        <label><input type="checkbox" value="python" name="language"> Python </label>
        <button type="button">Get Selected Values</button>
      $(document).ready(function() {
              var arr = [];
              $.each($("input[name='language']:checked"), function(){
              alert("Your selected languages are: " + arr.join(", "));
Enter fullscreen mode Exit fullscreen mode


How To Get Multiple Checkbox Value In jQuery

Top comments (0)

Visualizing Promises and Async/Await 🀯

async await

☝️ Check out this all-time classic DEV post