javascript TEXTAREA readOnly

readOnly NN 6 IE 4 DOM 1  

 

Read/Write  

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.

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

Boolean value: true | false.

 
Default

false


  • Brainboie
    #1
    2008-12-10
    [Quote]
    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;
  • a
    #2
    2010-01-06
    [Quote]
    right, should not have quotes
Brainboie
a

2083,Nickname,Homepage or email,Comments here,Add comment