Home > Web Front-end > JS Tutorial > JS judgment example of text box value_javascript skills

JS judgment example of text box value_javascript skills

WBOY
Release: 2016-05-16 16:55:58
Original
950 people have browsed it

JS judgment can only be numbers and decimal points (extracted from other materials, published here only for personal use and search convenience)

1. The text box can only enter numbers (excluding decimal points)



2. Only numbers and decimal points can be entered.





3. Numbers and decimal points method two



4. Only letters and Chinese characters can be entered



5. Only English letters and numbers can be entered, but Chinese characters cannot be entered



6. Only numbers and English can be entered chun



7. Only decimal points can be entered Can have up to two digits (numbers, Chinese can be entered), letters and arithmetic symbols cannot be entered:



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:



Only numbers, decimal points and addition, subtraction and multiplication

onkeypress="return event.keyCode>=4&&event.keyCode

Related labels:
js
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template