Use the `onchange` event. Checkboxes can also be toggled with the keyboard.