HTML DOM Textarea Object>>

Textarea Object

The Textarea object represents a text-area in an HTML form. For each instance of an HTML <textarea> tag in a form, a Textarea object is created.

You can access a Textarea object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().

IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).

Textarea Object Properties

Property Description IE  F N W3C
accessKey Sets or returns the keyboard key to access the textarea 4     Yes
cols Sets or returns the width (in characters) of the textarea 3 1 6 Yes
defaultValue Sets or returns the initial contents of the textarea 3     Yes
disabled Sets or returns whether or not the textarea should be disabled 5 1 6 Yes
form Returns a reference to the textarea's parent form 3 1 2 Yes
id Sets or returns the id of the textarea (In IE 4 this property is read-only) 4 1   No
name Sets or returns the name of the textarea 3 1 2 Yes
readOnly Sets or returns whether or not the textarea should be read-only 4 1 6 Yes
rows Sets or returns the height (in rows) of the textarea 3 1 6 Yes
tabIndex Sets or returns the tab order for the textarea 4     Yes
type Returns the type of the form element. For a textarea object it will always be "textarea" 3 1 3 Yes
value Sets or returns the text in the textarea 3 1 2 Yes

Textarea Object Methods

Method Description IE F N W3C
blur() Removes focus from the textarea 3 1 2 Yes
click() Simulates a mouse-click in the textarea 4     No
focus() Sets focus on the textarea 3 1 2 Yes
select() Selects and highlights the entire text that is in the textarea 4 1 2 Yes

Textarea Object Events

Syntax: object.event_name="someJavaScriptCode"

Event Description IE F N W3C
onBlur Executes some code when the textarea loses focus 3 1 2  
onChange Executes some code when the textarea loses focus and its value has altered 3 1 2  
onClick Executes some code when the user clicks the left mouse button in the textarea 4      
onFocus Executes some code when the textarea gets focus 3 1 2  
onKeyDown Executes some code when a key is pressed down in the textarea   1 4  
onKeyPress Executes some code when a key is pressed in the textarea   1 4  
onKeyUp Executes some code when a key is released in the textarea   1 4  
onSelect Executes some code when some text in the textarea is selected   1 2  

 

<< Back








   



MSN Nick Name



More Resources...





Most Viewed Services:
  1. HTML Tutorial
  2. XHTML Tutorial
  3. CSS Tutorial
  4. Javascript Tutorial
  5. DHTML Tutorial
  6. VB Script
  7. TCP/IP Tutorial
  8. ADO Tutorial
  9. MYSQL Tutorial
  10. ASP Tutorial
  11. AJAX Tutorial
  12. CFML Tutorial
  13. PHP Tutorial
  14. WML Tutorial
  15. FLASH Tutorial
  16. XML Tutorial
  17. RSS Tutorial
  18. SQL Tutorial
  19. HTML Articles
  1. Javascript Articles
  2. PHP Articles
  3. SEO Articles
  4. Web Design Articles
  5. SEO Tips
  6. Web Design Tips
  7. Articles
  8. CSS
  9. CSS Tips
  10. HTML Tips
  11. JAVASCRIPT Tips
  12. MYSQL Tips
  13. PHP Tips
  14. Money
  15. Tutorials
  16. Web Hosting



  • Home
  • Web Directory
  • Top Directoriers
  • Webmaster Directories
  • Contact
  • © Copyright 2006 All Rights Reserved By CodeDcode.Com