Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

allow only numbers and special characters in textbox using javascript

// Numeric Digits & Symbol only (Jquery)
    $('#valuepoints').keyup(function () {
        if (!this.value.match(/^(d|-)+$/)) {
            this.value = this.value.replace(/[^0-9-]/g, '');
        }
    });
 
PREVIOUS NEXT
Tagged: #numbers #special #characters #textbox #javascript
ADD COMMENT
Topic
Name
2+7 =