Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

allow only letters javascript

document.getElementById('inputid').onkeypress=function(e){
    if(!(/[a-z ]/i.test(String.fromCharCode(e.keyCode)))) {
        e.preventDefault();
        return false;
    }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery url change 
Javascript :: mui textfield font color 
Javascript :: js addeventlistener mouseout 
Javascript :: remove bearer from token in node js 
Javascript :: js add week to date 
Javascript :: write files in node js 
Javascript :: fetch json 
Javascript :: truncate function react 
Javascript :: get value of input element on button click react 
Javascript :: javascript detect scroll to bottom of page 
Javascript :: Get Current Date And Time In Node.js 
Javascript :: open html file in browser using package.json 
Javascript :: reload app in react native 
Javascript :: console.log regex 
Javascript :: javascript show div 
Javascript :: fizzbuzz js 
Javascript :: jquery radio button change 
Javascript :: how to save data i mongi db 
Javascript :: How to more than one slot in graph node in godot 
Javascript :: scss mute warnings 
Javascript :: sort an array by the laster letter of element javascript 
Javascript :: eslint disable react 
Javascript :: assert.match() nodejs 
Javascript :: change info pagination datatable 
Javascript :: sinha crud template 
Javascript :: how to push the get variables without page reloading in Jquery 
Javascript :: how to delay execution in nodejs 
Javascript :: visual code put quotes to each line 
Javascript :: brightness javascript onload 
Javascript :: javascript clone array without reference 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =