HTML input readonly Attribute
HTML <input> tag
Definition and Usage
The readonly attribute specifies that the input field is read only
(un-editable).
This attribute allows the user to highlight and copy the text inside
the input field, but not change the value.
This attribute is often used together with a JavaScript to keep the user from
editing a field before a specific task (lie clicking a button button or
selecting checkbox) is completed.
This attribute is only used if the type attribute of the input element is set
to "text" or "password".
Syntax
<input readonly="readonly" />
|
Attribute Values
Value |
Description |
readonly |
Specifies that the text or password field is read-only. |
Browser Support

The attribute is supported in all major browsers.
Example
<form action="">
<input type="text" name="demo" readonly="readonly" />
</form>
|
Try-It-Yourself Demos
input
readonly attribute example
How use the readonly attribute with the input type="text".
HTML <input> tag
Learn how your website performs under various load conditions
 |
|
WAPT
is a load, stress and performance testing tool for websites and web-based applications.
In contrast to "800-pound gorilla" load testing tools, it is designed to minimize the learning
curve and give you an ability to create a heavy load from a regular workstation.
WAPT is able to generate up to 3000 simultaneously acting virtual users using standard hardware configuration.
Virtual users in each profile are fully customizable. Basic and NTLM authentication methods are supported.
Graphs and reports are shown in real-time at different levels of detail, thus helping to manage the testing process.
Download the free 30-day trial!
|
|