As far as I know, I can only use the change event for it, but it's only triggered when I stop increasing/decreasing the number input, not on each and every step taken.
Is there any way to do that? On native javascript or jQuery.
Use input event : (because anyway support is better than the one for input type number )
$('input[type=number]').on('input', function(){
console.log(this.value);
});
$("#number").on('keyup change', function(e){
});
Will work!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.