Home > Web Front-end > JS Tutorial > body text

js controls input character parsing_javascript skills

WBOY
Release: 2016-05-16 17:06:44
Original
964 people have browsed it

ENTER key can move the cursor to the next input box

can only be in Chinese

Shield input method

Only English and numbers can be entered

Can only be numbers

Can only be displayed, cannot be modified

You can only enter numbers and determine the value of the key

Copy the code The code is as follows:




1. Only numeric codes can be entered in the text box (decimal points cannot be entered)

2. Only numbers can be entered, decimal points can be entered.

3. Number and decimal point method 2

4. Only letters and Chinese characters can be input

5. Only English letters and numbers can be entered, not Chinese

6. Only numbers and English can be enteredchun

7. There can only be up to two digits after the decimal point (numbers and 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


9. Only numbers, decimal points, and negative numbers can be entered

Copy code The code is as follows :



1. Cancel the dotted frame when the button is pressed, and add the attribute value hideFocus or HideFocus=true to the input

2. Read only the content of the text box and add attribute value in input readonly

3. Prevent TEXT documents that are cleared after going back (the style content can be used as a class reference)

4. The ENTER key can move the cursor to the next input box

5. Only in Chinese (with flashing)

6. Can only be numbers (with flashing)

7. Only numbers (no flashing)

8. Only English and numbers can be entered (with flashing)

9. Shield input method

10. Only numbers, decimal points, minus signs (-) characters can be entered (no flashing)

11. Only two decimal places and three decimal places can be entered (with flashing)

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