Programming

HTML <textarea> readonly Attribute

steloflute 2013. 6. 10. 23:30

http://www.w3schools.com/tags/att_textarea_readonly.asp

 

HTML <textarea> readonly Attribute

HTML textarea Tag Reference HTML <textarea> tag

Example

A read-only text area:

<textarea readonly>
At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>

Try it yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

The readonly attribute is supported in all major browsers.


Definition and Usage

The readonly attribute is a boolean attribute.

When present, it specifies that a text area should be read-only.

In a read-only text area, the content cannot be changed, but a user can tab to it, highlight it and copy content from it.

The readonly attribute can be set to keep a user from using a text area until some other condition has been met (like selecting a checkbox, etc.). Then, a JavaScript is required to remove the readonly value, and make the text area editable.


Differences Between HTML 4.01 and HTML5

NONE.


Differences Between HTML and XHTML

In XHTML, attribute minimization is forbidden, and the readonly attribute must be defined as <textarea readonly="readonly">.


Syntax

<textarea readonly>


 


HTML textarea Tag Reference HTML <textarea> tag

 

 

 

'Programming' 카테고리의 다른 글

(Racket) change encoding  (0) 2013.06.25
How to set focus using javascript?  (0) 2013.06.24
My favorite regex of all time  (0) 2013.06.04
Turning JavaScript's arguments object into an array  (0) 2013.06.01
Building LISP  (0) 2013.05.27