Reputation: 7941
I have an input[type=number]
and want an event that fires when either focus was lost and value changed (ie. onchange
), but also I want it to fire as soon as the number arrows are clicked (retaining the focus or not).
One idea was to capture the arrow click itself: Is it possible bind event onclick on those tiny arrows next to numerical input? I do not want to apply onclick on the whole input.
Upvotes: 3
Views: 2392
Reputation: 8068
In this answer What events does an <input type="number" /> fire when it's value is changed?
it is suggested to use oninput
HTML5 event, as change
fires on blur.
Upvotes: 3