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
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" />
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" />
, 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"/>