Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

validar solo letras js

$("input.nombre").bind('keypress', function(event) {
  var regex = new RegExp("^[a-zA-Z ]+$");
  var key = String.fromCharCode(!event.charCode ? event.which : event.charCode);
  if (!regex.test(key)) {
    event.preventDefault();
    return false;
  }
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: input type text js 
Javascript :: updatedAt 
Javascript :: datatable processing 
Javascript :: &nbsp replace javascript 
Javascript :: alpinejs cdn 
Javascript :: how to output only a certain length of a string in javascript 
Javascript :: npm youtube-react 
Javascript :: get index of option in select jquery 
Javascript :: joi email validation regex 
Javascript :: google map react iframe 
Javascript :: fibonacci sequence in javascript 
Javascript :: How to parse POST requests with express nodejs 
Javascript :: js deep copy array 
Javascript :: js addeventlistener mouseout 
Javascript :: Writing files in Node.js 
Javascript :: jquery clear click event 
Javascript :: npm install router dom 
Javascript :: Statements and Expressions 
Javascript :: jquery get value name uploaded file 
Javascript :: short date angular pipe 
Javascript :: js date format dd/mm/yyyy 
Javascript :: #react native shadow 
Javascript :: UnhandledPromiseRejectionWarning: MongoNotConnectedError: 
Javascript :: javascript getPersons error 
Javascript :: disabled javascript 
Javascript :: how to get all items in localstorage 
Javascript :: javascript canvas without html 
Javascript :: remove element from array javascript 
Javascript :: node google client api to get user profile with already fetched token 
Javascript :: python phantomjs current url 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =