I have a form with a checkbox. With jQuery I would like to set the value of the checkbox to TRUE if checked, and if it is not checked, the value will be set to FALSE. How I can do this please?
Jquery – Setting the value of checkbox to true or false with jQuery
jquery
Related Topic
- Javascript – How to upload files asynchronously with jQuery
- Javascript – How to get the children of the $(this) selector
- Javascript – Setting “checked” for a checkbox with jQuery
- Javascript – How to know which radio button is selected via jQuery
- Javascript – $(document).ready equivalent without jQuery
- Javascript – How to check whether a checkbox is checked in jQuery
- Javascript – Get selected text from a drop-down list (select box) using jQuery
- Javascript – Scroll to an element with jQuery
Best Answer
You can do (jQuery 1.6 onwards):
to remove you can also use:
with jQuery < 1.6 you must do