With this code, you can change the value of the check box to 1 when it is checked, or to 0 when it is unchecked:
The HTML:
<input type="checkbox" id="read" onClick="" />
- You should do this:
onclick="$(this).attr('value', this.checked ? 1 : 0)"
- Or even:
onclick="$(this).val(this.checked ? 1 : 0)"