Javascript Reference
Categories: InputTypeText

javascript InputTypeText readOnly

@March 15, 2008, 1:22 a.m.
readOnlyFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 1  

Read-only  

Specifies whether the form element can be edited on the page by the user. A form control that has a readOnly property set to true may still be modified by scripts, even though the user may not alter the content.

 
Example
 
if (document.forms[0].myText.readOnly) {
    ...
}
 
Value

Boolean value: true | false.

 
Default

false


Powered by Linode.