Home >Web Front-end >HTML Tutorial >What does input type mean and commonly used methods to limit input_HTML/Xhtml_Web page production

What does input type mean and commonly used methods to limit input_HTML/Xhtml_Web page production

WBOY
WBOYOriginal
2016-05-16 16:40:202221browse

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

Copy code
The code is as follows:



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

Copy the code
The code is as follows:



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

Copy code
The code is as follows:



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

Copy code
The code is as follows:



5. Only for Chinese (with flashing)

Copy code
The code is as follows:



6. Can only be numbers (with flashing)

Copy code
The code is as follows:



7. Only numbers (no flashing)

Copy the code
The code is as follows:



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

Copy code
The code is as follows:



9. Shield input method

Copy code
The code is as follows:



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

Copy code
The code is as follows:



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

Copy code
The code is as follows:


Statement:
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