Mastering the Web
Contents
Website Planning Tutorial
Website Design Tutorial
HTML Tutorial
HTML Tables Tutorial
CGI Tutorial
JavaScript Tutorial
Perl Tutorials
CSS Tutorial
Installing a Web Server
Security Tutorial
HTML Cookies Tutorial
Web Tracking Tutorial
Download Free Programs
F.A.Q.

  1. JavaScript Tutorial
  2. How to make pop-up windows
  3. JavaScript Object Reference (1)
  4. JavaScript Object Reference (2)
  5. JavaScript Object Reference (3)
  6. JavaScript Object Reference (4)
  7. JavaScript Object Reference (5)
  8. JavaScript Object Reference (6)
  9. JavaScript Functions and Operators

Download FWTLogstat1

Download FWTLogstat2

JavaScript Object Reference (4)

The password Object

The password object reflects a password text field from an HTML form in JavaScript.

Properties

defaultValue
A string value containing the default value of the password element (i.e. the value of the VALUE attribute).
name
A string value containing the name of the password element.
value
A string value containing the value of the password element.

Methods

focus()
Emulates the action of focusing in the password field.
blur()
Emulates the action of removing focus from the password field.
select()
Emulates the action of selecting the text in the password field.

The radio Object

The radio object reflects a set of radio buttons from an HTML form in JavaScript. To access individual radio buttons, use numeric indexes starting at zero. For instance, individual buttons in a set of radio buttons named testRadio could be referenced by testRadio[0], testRadio[1], etc.

Properties

checked
A boolean value indicating if a specific button is checked. Can be used to select or deselect a button.
defaultChecked
A boolean value indicating if a specific button was checked by default (i.e. reflects the CHECKED attribute).
length
An integer value indicating the number of radio buttons in the set.
name
A string value containing the name of the set of radio buttons.
value
A string value containing the value a specific radio button in a set (i.e. reflects the VALUE attribute).

Methods

click()
Emulates the action of clicking on a radio button.

Event Handlers

onClick
Specifies JavaScript code to execute when a radio button is clicked.

The reset Object

The reset object reflects a reset button from an HTML form in JavaScript.

Properties

name
A string value containing the name of the reset element.
value
A string value containing the value of the reset element.

Methods

click()
Emulates the action of clicking on the reset button.

Event Handlers

onClick
Specifies JavaScript code to execute when the reset button is clicked.

The select Object

The select object reflects a selection list from an HTML form in JavaScript.

Properties

length
An integer value containing the number of options in the selection list.
name
A string value containing the name of the selection list.
options
An array reflecting each of the options in the selection list in the order they appear. The options property has it's own properties:

    defaultSelected 
    A boolean value indicating if an option was selected by
    default (i.e. reflects the SELECTED attribute).

    index 
    An integer value reflecting the index of an option.

    length 
    An integer value reflecting the number of options in the
    selection list.

    name 
    A string value containing the name of the selection list.

    options 
    A string value containing the full HTML code for the 
    selection list.

    selected 
    A boolean value indicating if the option is selected. Can
    be used to select or deselect an option.

    selectedIndex 
    An integer value containing the index of the currently
    selected option.

    text 
    A string value containing the text displayed in the
    selection list for a particular option.

    value 
    A string value indicating the value for the specified
    option (i.e. reflects the VALUE attribute).

selectedIndex
Reflects the index of the currently selected option in the selection list.

Event Handlers

onBlur
Specifies JavaScript code to execute when the selection list loses focus.
onFocus
Specifies JavaScript code to execute when focus is given to the selection list.
onChange
Specifies JavaScript code to execute when the selected option in the list changes.

Previous | Contents | Next

| HOME | FEEDBACK | BOOKMARK |
Build your Website
© 1999-2008 Hector Castro -- All rights reserved

If your doubt is not answered in this site, please use the
contact form .
I'll answer as soon as posible.
I can help you using instant messaging. To schedule a meeting, please use the
meeting form.
You will find the late news about the free programs offered here on my blog
Free Webmaster Tools
You can get news about updates to my free programs through this
RSS feed.

www.great-web-info.com