form.check checked code example

Example 1: submit form when checkbox is checked

<input onChange="this.form.submit()" ... />

Example 2: submit form when checkbox is checked

onChange="this.form.submit()"

Example 3: html checkbox default checked

<!-- Add checked tag  -->
<input type="checkbox" name="vehicle3" value="Boat" checked>

Example 4: how to make checkbox checked in html

<input type="checkbox" checked={props.completed} /> 

#for props completed is true/false , hence if completed is false then checkbox will not be clicked .
# if the checkbox is true it will be will be checked