<input type="number" oninput="inputChange(value)" id="input" >
let timer = 0
function inputChange(val) {
console.log(val)
clearTimeout(timer)
const input = document.getElementById('input')
timer = setTimeout(function () {
if (val < 0) {
input.value = 0
} else if (val > 100) {
input.value = 100
}
}, 500)
}