A Text object provides a field on a form in which the user can enter data and is created with every instance of an HTML <INPUT> tag with the type attribute set to "text". These objects are then stored in the elements array of the parent form and accessed using either the name defined within the HTML tag or an integer (with '0' being the first element defined, in source order, in the specified form).
This property sets or returns a string indicating the initial value of the Text object. The value of this property initially reflects the value between the start and end <TEXT> tags. Use of the defaultValue property, which can be done at any time, will override the original value.
Syntax: object.defaultValue[ = "newdefaultvalue"]
This property returns a reference to the parent Form of the Text
This property sets or returns the value of the Text object's
Every element on a form has an associated type property. In the
case of a Text object, the value of this property is always
This property sets or returns the Text object's value
attribute. This is the text that is actually displayed in the text field and can be set at any time with any changes being immediately displayed.
This method removes the focus from the specified Text
Syntax: object.blur( )
This method gives focus to the specified Text object.
Syntax: object.focus( )
This method calls the handler for the specified event.
This method is used to select and highlight the entire text that is currently in the input field.
When the user starts typing, they will replace whatever is currently there.
Used in conjunction with the focus method, this makes it easy to prompt the user for input
and places the cursor in the correct place.
Syntax: object.select( )
onBlur Event handler
of a blur event (when the Text object loses focus).
onChange Event handler
of a click event (when the Text object loses focus and its value has altered).
onFocus Event handler
of a focus event (when the Text object receives focus).
onSelect Event handler
of a select event (when some text in the text field is selected).