The functions and differences between disabled and readonly

The functions and differences between disabled and readonly
1: readonly is to lock this control so that it cannot be modified on the interface (but it can be modified through JavaScript).

2: disabled and readonly have the same point that they can lock the control so that users cannot change its value, but disabled is more thorough. It prevents you from using it at all, including changing its background color (if you don't believe it, try to modify a disabled input text box and you will find that your efforts are in vain). If it is a checkbox, it cannot be selected.

3: All controls have a disabled attribute, but not necessarily a readonly attribute. Such as select drop-down box

<<:  Sample code for implementing multi-application deployment using tomcat+nginx

>>:  A Deeper Look at the Differences Between Link and @import

Recommend

Implementation of k8s deployment of docker container

Environment: (docker, k8s cluster), continue with...

CSS3 achieves infinite scrolling/carousel effect of list

Effect Preview Ideas Scroll the current list to t...

Service management of source package installation under Linux

Table of contents 1. Startup management of source...

Using Nginx to implement grayscale release

Grayscale release refers to a release method that...

js to achieve interesting countdown effect

js interesting countdown case, for your reference...

Detailed explanation of how to dynamically set the browser title in Vue

Table of contents nonsense text The first router/...

How to uninstall MySQL 8.0 version under Linux

1. Shut down MySQL [root@localhost /]# service my...

Win10 installation Linux system tutorial diagram

To install a virtual machine on a Windows system,...

PHP-HTMLhtml important knowledge points notes (must read)

1. Use frameset, frame and iframe to realize mult...

Use pure CSS to create a pulsating loader effect source code

Effect Preview Press the "Click to Preview&q...

I have sorted out some domestic design websites that I think are good.

<br />I have compiled some domestic design w...

Pure CSS to achieve input box placeholder animation and input verification

For more exciting content, please visit https://g...