I have an HTML <input>
element with type="number"
:
I want to use a step
value of 1. That is, any integer is allowed. However, I would also like the arrow buttons to increment/decrement the value of the input by some value, for example, 5. Is this possible?
From the MDN docs, I can't find a way to accomplish this using HTML alone. I would also accept an answer involving intercepting the input
event using javascript to change the value
of the input, but I don't know of a way to distinguish between a change due to keypresses vs. a change due to clicking the arrow buttons.