Use onclick, not onchange for checkboxes
Note to self: Always use onclick
, not onchange
, on checkboxes.
Most browsers work fine, but Internet Explorer only seems to invoke onchange
when the checkbox loses focus. However, onclick
is invoked whenever the value changes, even if it wasn’t clicked, but triggered with the keyboard. Go figure.
About Calvin Correli
I've spent the last 17 years learning, growing, healing, and discovering who I truly am, so that I'm now living every day aligned with my life's purpose.
0 comments
Leave a comment