When I\'m giving input type number the letter e and special charecters are also displaying in input field. I want to display only digits. How to block them?
e
$("#input").on("input", function() { var nonNumReg = /[^0-9]/g $(this).val($(this).val().replace(nonNumReg, '')); });