Display a <input type="checkbox"> element with a box in the middle rather than a check mark - Javascript jQuery

Javascript examples for jQuery:Form Checkbox

Description

Display a <input type="checkbox"> element with a box in the middle rather than a check mark

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.8.3.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){//www.ja v  a2 s .  c o m
$("#b").prop("checked", true);
$("#c").prop("indeterminate", true);
    });

      </script> 
 </head> 
 <body> 
  <input type="checkbox" id="a"> 
  <input type="checkbox" id="b"> 
  <input type="checkbox" id="c">  
 </body>
</html>

Related Tutorials