• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

The select Object [2|3]

The select Object [2|3]

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 its own properties:

    defaultSelected

    A Boolean value indicating whether an option was selected by default (that is, it 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.



    selected

    A Boolean value indicating whether 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 (that is, it reflects the VALUE attribute).



  • selectedIndex— Reflects the index of the currently selected option in the selection list


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint