Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

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, '');
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #html #input #numbers #special #characters #textbox
ADD COMMENT
Topic
Name
7+2 =