delete e when input number
https://stackoverflow.com/questions/39291997/how-to-block-e-in-input-type-number
document.querySelector(".your_class").addEventListener("keypress", function (evt) {
if (evt.which != 8 && evt.which != 0 && evt.which < 48 || evt.which > 57)
{
evt.preventDefault();
}
});
delete e when input number
Reviewed by Leo
on
September 22, 2022
Rating:
Tidak ada komentar