checkbox with value code example

Example 1: checkbox value

<input type="checkbox" name="vehicle1" value="Bike">

The checkbox value is 'Bike'.

Example 2: get checkbox value in div TAG

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<div id="cs-input"></div>
<div id="CS-popup" class="popup-windows ">
  <label>
    <input type="checkbox" name="CS" value="GMSC01" />GMSC01
  </label>
  <label>
   <input type="checkbox" name="CS" value="GMSC02" data-selector="GMSC02BOX" />GMSC02
  </label>
  <label>
   <input type="checkbox" name="CS" value="VMSC01" data-selector="VMSC01BOX" />VMSC01
  </label><br />
  
  <label>
   <input type="checkbox" name="CS" value="VMSC02" data-selector="VMSC02BOX" />VMSC02
  </label>
  <label>
   <input type="checkbox" name="CS" value="GMGW01" data-selector="GMGW01BOX" />GMGW01
  </label>
  <label>
    <input type="checkbox" name="CS" value="GMGW02" data-selector="GMGW02BOX" />GMGW02
  </label><br />
  
  <label>
   <input type="checkbox" name="CS" value="VMGW01" data-selector="VMGW01BOX" />VMGW01
  </label>
  <label>
  <input type="checkbox" name="CS" value="VMGW02" data-selector="VMGW02BOX" />VMGW02
  </label>
  <label>
  <input type="checkbox" name="CS" value="SPS01" data-selector="SPS01BOX" />SPS01
  </label><br />

  <label>
   <input type="checkbox" name="CS" value="SPS02" data-selector="SPS02BOX" />SPS02
  </label>
  <label>
    <input type="checkbox" name="CS" value="HSS01" data-selector="HSS01BOX" />HSS01
  </label>
  <label>
    <input type="checkbox" name="CS" value="HSS02" data-selector="HSS02BOX" />HSS02
  </label><br />
</div>

Tags:

Html Example