Just wondering whether anyone knows what events an HTML5 <input type="number" />
element fires when its up / down arrows are clicked:
I'm already using an onblur
for when the focus leaves the input field.
The onchange event occurs when the value of an element has been changed.
Whenever the value of a form field changes, it fires a "change" event.
change
would be the event that is fired when the field's value changes.
I think the HTML5 event input
would also fire.
I found that for jQuery the following code covered keyboard input, mousewheel changes and button clicks in Chrome, and also handled keyboard input in Firefox
$("input[type=number]").bind('keyup input', function(){ // handle event });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With