Home  >  Article  >  Web Front-end  >  Disable input text box input implementation attribute_HTML/Xhtml_Web page production

Disable input text box input implementation attribute_HTML/Xhtml_Web page production

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

Today I want to summarize a few very useful html tags, which are often used in development. People who are not familiar with them may not really understand them. They are:

Copy Code
The code is as follows:

readonly, disabled, autocomplete

readonly means that the value of this field cannot be modified and can only be used with type= Used in conjunction with "text", it can be copied, selected, and can receive focus. The passed value will be received in the background.

Copy code
The code is as follows:



disabled means input is disabled The element cannot be edited, copied, selected, cannot receive focus, and the value passed in the background will not be received

Copy code
The code is as follows:



Also you can Shield the input method through css:
Finally, introduce a commonly used tag. Browsers usually record the input input box, so when you input, you often There is a lot of drop-down content, as shown below:
If you want to remove it, it is best to add autocomplete="off". The usage is as follows: autocomplete="off"

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