Home > Web Front-end > JS Tutorial > js restricts input to numbers, letters, Chinese characters, etc._javascript skills

js restricts input to numbers, letters, Chinese characters, etc._javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 17:08:20
Original
1146 people have browsed it
Copy code The code is as follows:



1. Only numeric codes can be entered in the text box (decimal points cannot be entered either)
Copy code The code is as follows:



2. Only You can enter numbers and decimal points.
Copy code The code is as follows:




3. Numbers And decimal point method two
Copy code The code is as follows:



4. Only letters and Chinese characters can be entered
Copy code The code is as follows:



5. Only English letters and numbers can be entered, but Chinese cannot be entered
Copy the code The code is as follows:



6. Only numbers and English can be entered
Copy code The code is as follows:



7. Only after the decimal point There can be up to two digits (numbers and Chinese can be entered), letters and arithmetic symbols cannot be entered:
Copy code The code is as follows:

57) &&event.keyCode!=46 ||/.dd$/.test(value))event .returnValue=false">

8. There can only be up to two digits after the decimal point (numbers, letters, and Chinese can be entered), and operation symbols can be entered:
Copy code The code is as follows:


Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Where is js written?
From 1970-01-01 08:00:00
0
0
0
js file code not found
From 1970-01-01 08:00:00
0
0
0
js addClass not working
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template