Javascript Reference
Categories: TEXTAREA

javascript TEXTAREA readOnly

@May 11, 2009, 10:20 a.m.
readOnly Firefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 1  



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

document.forms[0].myTextArea.readOnly = true;

Boolean value: true | false.



right, should not have quotes
a - 2010-01-06
The example given appears to show that the boolean value expressed must be written as a String; whereas, the value should not be expressed (or does not work every time) with double-quotes. I'd recommend using: [object].readOnly=true;
Brainboie - 2008-12-10

Powered by Linode.