Textarea

Team-Fly    

 
Webmaster in a Nutshell, 3rd Edition
By Robert Eckstein, Stephen Spainhour
Table of Contents
Chapter 11.  JavaScript


Textarea Client-Side JavaScript 1.0

Multiline text input Inherits From: Element
  form  .elements[  i  ]  form  .elements[  name  ]  form  .  name  

Description

The Textarea object is very similar to the Input object.

Properties

The Textarea object defines properties for each of the attributes of the HTML <textarea> tag, such as cols, defaultValue, disabled, name, readOnly, and rows. In addition, it defines the following properties:

form

The Form object that contains this Textarea object. Read-only.

type

A read-only string property that specifies the type of the element. For Textarea objects, this property is always "textarea".

value

A read/write string that specifies the text contained in the Textarea. The initial value of this property is the same as the defaultValue property.

Methods

blur( )

Yields the keyboard focus and returns nothing.

focus( )

Grabs the keyboard focus and returns nothing.

select( )

Selects the entire contents of the text area. Returns nothing.

Event Handlers

onblur

Invoked when input focus is lost.

onchange

Invoked when the user changes the value in the Textarea element and moves the keyboard focus elsewhere. This event handler is invoked only when the user completes an edit in the Textarea element.

onfocus

Invoked when input focus is gained .

See Also

Element, Form, Input


Team-Fly    
Top


Webmaster in a Nutshell
Webmaster in a Nutshell, Third Edition
ISBN: 0596003579
EAN: 2147483647
Year: 2002
Pages: 412

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net