Take the following example:In this example, we've got a name of subscribe, and a value of newsletter. Return the checked property: ... A Boolean, returns true if the checkbox is checked, and false if the checkbox is not checked: More Examples. The choice depends on the jQuery versions. Open up your favorite HTML or text editor. Checkboxes. A disabled checkbox is unclickable and unusable. ; Style the label with the width, height, background, margin, and border-radius properties. Defines a checkbox, which the user can toggle on or off. Check Uncheck All checkboxes implementation in an html page using javascript with example. Checkboxes are used when more than one option is required to be selected.Following is an example HTML code, CheckBox.htm, for a form with two checkboxes. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. jQuery provides the attr( ) and prop() methods to accomplish the task. The attribute "name" should be defined and be same. Learn more. The CheckBoxFor() HTML Helper method binds a specified model object property to the checkbox element. How do I keep a checkbox checked? James Hibbard demonstrates how to persist checkbox checked state (useful for remembering users' preferences) and implement a check/uncheck all button.