mark checkbox as checked code example

Example 1: jquery checkbox set checked

//For jQuery 1.6 and above
$('#myCheckBoxID').prop('checked', true);
//For jQuery Before 1.6
$('#myCheckBoxID').attr('checked','checked');

Example 2: how to set checkbox checked

<input type="checkbox" name="vehicle3" value="Boat" checked>

#If if helps you give it Thumbs up

Example 3: 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

Tags:

Html Example