Get the App
SLTechnology News&Howtos  ›  Development  › 

How to set input to read-only effect through disabled and readonly in html

Shulou Source: shulou.com Published: 2022-06-01 06:50:46 10月01日 Update

This article mainly introduces how to set input to read-only effect through disabled and readonly in html. The article is very detailed and has certain reference value. Interested friends must finish reading it!

There are two ways to achieve the read-only effect of input: disabled and readonly.

Naturally, both effects can only be read but not edited, but the two are very different.

Disabled states that the input is invalid and that its value will not be passed to any programs, such as asp, php, and so on.

Readonly simply cannot be edited and does not affect the transfer of its value.

Disabled uses:

Readonly uses:

These are all the contents of the article "how to set input to read-only effects through disabled and readonly in html". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Effects content articles different great value interest guys partners ways more knowledge procedures nature industry information information channels channels references help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Tech Info Linux vpn Redmi