Name

Select — a graphical selection list

Availability

Client-side JavaScript 1.0; enhanced in JavaScript 1.1

Inherits From

Input, HTMLElement

Synopsis

form.element_name
                     form.elements[i]

Properties

Select inherits properties from Input and HTMLElement and defines or overrides the following:

length

The number of options in a Select object.

options[]

The choices in a Select object. JavaScript 1.0; enhanced in JavaScript 1.1.

selectedIndex

The selected option. JavaScript 1.0; writeable in JavaScript 1.1.

type

Type of form element. JavaScript 1.1.

Methods

Select inherits the methods of Input and HTMLElement.

Event Handlers

Select inherits event handlers from Input and HTMLElement and defines or overrides the following:

onchange

The handler invoked when the selection changes.

Get Webmaster in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.