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

Docker configures the storage location of local images and containers

Use the find command to find files larger than a ...

MySQL data analysis storage engine example explanation

Table of contents 1. Introduce cases 2. View the ...

JavaScript uses setTimeout to achieve countdown effect

In order to enhance the ability to write JavaScri...

Javascript asynchronous programming: Do you really understand Promise?

Table of contents Preface Basic Usage grammar Err...

JavaScript built-in date and time formatting time example code

1. Basic knowledge (methods of date objects) 😜 ge...

How to quickly deploy an Elasticsearch cluster using docker

This article will use Docker containers (orchestr...

MySQL NULL data conversion method (must read)

When using MySQL to query the database and execut...

Mysql aggregate function nested use operation

Purpose: Nested use of MySQL aggregate functions ...

Teach you MySQL query optimization analysis tutorial step by step

Preface MySQL is a relational database with stron...

JavaScript object-oriented class inheritance case explanation

1. Object-oriented class inheritance In the above...

How to install Elasticsearch7.6 cluster in docker and set password

Table of contents Some basic configuration About ...

CentOS method to modify the default ssh port number example

The default ssh port number of Linux servers is g...