(jQuery) Only allow number keyboard input


$("input").on("keypress", function (e) {
    if (!jQuery.isNumeric(String.fromCharCode(e.which)))
        return false;
});
JavaScript

Leave a Reply

Your email address will not be published. Required fields are marked *