Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript allow only numeric characters

$('#MyTextInput').on('propertychange input', function () {
  let result = $(this).val().replace(/[^d]+/g, '');
  $(this).val(result);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #numeric #characters
ADD COMMENT
Topic
Name
3+3 =