Answers for "html input only numbers and special characters in textbox"

0

html input only numbers and special characters in textbox

$('.input').keyup(function () {
    if (!this.value.match(/^(\d|-)+$/)) {
        this.value = this.value.replace(/[^0-9-]/g, '');
    }
});
Posted by: Guest on March-15-2022

Code answers related to "html input only numbers and special characters in textbox"

Browse Popular Code Answers by Language