1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
<title>jQuery check/uncheck a check box example</title> <script src="http://code.jquery.com/jquery-2.2.3.min.js"></script> <h1>jQuery check / uncheck a check box example</h1> <script type="text/javascript"> $(document).ready(function(){ $("#checkIt").click(function () { $('#checkme').prop( "checked", true ); }); $("#UnCheckIt").click(function () { $('#checkme').prop( "checked", false ); }); }); </script> <input id="checkme" type="checkbox" name="checkme">Check Me <br> <br> <input type="button" value="Check It" id="checkIt"> <input type="button" value="UnCheck It" id="UnCheckIt"> |
Live Demo:Â
Was this post helpful?
Let us know if this post was helpful. Feedbacks are monitored on daily basis. Please do provide feedback as that\'s the only way to improve.