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

Disable input text box input implementation attributes

黄舟
Release: 2016-12-12 13:56:48
Original
4523 people have browsed it

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:

readonly、disabled、autocomplete
Copy after login

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 background will receive the passed value.

<input type="text" name="www.xxx" readonly="readonly" />
Copy after login

disabled means that the input element is disabled, cannot be edited, cannot be copied, cannot be selected, cannot receive focus, and the background will not After receiving the passed value

<input type="text" name="www.xxx.com" disabled="disabled" />
Copy after login

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

<input type="text" autocomplete="off" id="number"/>
Copy after login


Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!