Export (0) Print
Expand All
all
alt
ch
dir
id
min
rel
top
url
URL
urn
Expand Minimize
5 out of 12 rated this helpful - Rate this topic

readonly attribute | readOnly property

Sets or retrieves the value indicated whether the content of the object is read-only.

Syntax

HTML<element readonly="p" ... >
JavaScript

p = object.readOnly

Property values

Type: Boolean

false (false)

Default. Property is not set on the object.

true (true)

Object is set to read-only.

Remarks

If the value of the readOnly property is set to true, the user cannot enter or edit text in the control. When set to true, the property still allows the object to receive the focus, whereas the disabled property does not.

See also

input type=email
input type=number
input type=password
input type=range
input type=search
input type=tel
input type=text
input type=url
textArea

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.