Set the input to read-only via disabled and readonly

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

Naturally, both results can only be read but not edited, but there are big differences between the two.

Disabled means that the input is invalid and its value will not be passed to any program, such as asp, php, etc.
Readonly simply cannot be edited and does not affect the transmission of its value.

Disabled usage: <INPUT type="text" name="username" value="james" disabled>
Readonly usage: <INPUT type="text" name="partNumber" value="1500" readonly>

<<:  A brief discussion on whether too many MySQL data queries will cause OOM

>>:  How to distribute two buttons on the left and right sides of the same parent tag using CSS

Recommend

How to view and set the mysql time zone

1. Check the database time zone show variables li...

MySQL database JDBC programming (Java connects to MySQL)

Table of contents 1. Basic conditions for databas...

MySQL learning to create and operate databases and table DDL for beginners

Table of contents 1. Operate the database 1.1 Cre...

Hyper-V Introduction and Installation and Use (Detailed Illustrations)

Preface: As a giant in the IT industry, Microsoft...

Element Timeline implementation

Table of contents Components - Timeline Custom no...

Solution to IDEA not being able to connect to MySQL port number occupation

I can log in to MYSQL normally under the command ...

Detailed explanation of the new CSS display:box property

1. display:box; Setting this property on an eleme...

Teach you how to quickly enable self-monitoring of Apache SkyWalking

1. Enable Prometheus telemetry data By default, t...

Detailed explanation of MySQL partition table

Preface: Partitioning is a table design pattern. ...

Content-type description, that is, the type of HTTP request header

To learn content-type, you must first know what i...

MySQL startup error InnoDB: Unable to lock/ibdata1 error

An error message appears when MySQL is started in...