Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript allow only alphanumeric characters

$('#MyTextInput').on('propertychange input', function () {
  let result = $(this).val().replace(/[^0-9a-z]/gi, '');
  $(this).val(result);
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: rn push notification No task registered for key ReactNativeFirebaseMessagingHeadlessTask 
Javascript :: react native text area align top 
Javascript :: how to make an express server 
Javascript :: stopped typing jquery 
Javascript :: sort alphabetically javascript 
Javascript :: v-for vue 
Javascript :: usehistory example 
Javascript :: jQuery.easing[this.easing] is not a function 
Javascript :: generate module with routing in angular 
Javascript :: angular usehash not working 
Javascript :: how to add onclick event in javascript 
Javascript :: jquery all elements whose id contains 
Javascript :: value is array 
Javascript :: classlist has class 
Javascript :: jquery ajax delete 
Javascript :: regex all starting with 
Javascript :: protractor element.all for each 
Javascript :: Chart is not a constructor 
Javascript :: js remove spaces 
Javascript :: js scrollto 
Javascript :: find quotient in javascript 
Javascript :: replace all spaces with dash in javascript 
Javascript :: javascript restrict number to range 
Javascript :: regex for yyyy-mm-dd 
Javascript :: remove duplicate object from array 
Javascript :: javascript letters as number 
Javascript :: Get child node index 
Javascript :: convert object to json javascript 
Javascript :: nested array loop in javascript 
Javascript :: neo4j delete relationship nodes 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =