Skip to Main Content
JavaScript: The Definitive Guide, Fourth Edition
book

JavaScript: The Definitive Guide, Fourth Edition

by David Flanagan
November 2001
Intermediate to advanced content levelIntermediate to advanced
936 pages
68h 43m
English
O'Reilly Media, Inc.
Content preview from JavaScript: The Definitive Guide, Fourth Edition

Name

HTMLSelectElement — a <select> element in an HTML form

Availability

DOM Level 1 HTML

Inherits from/Overrides

Node Element HTMLElement HTMLSelectElement

Properties

boolean disabled

If true, the <select> element is disabled and the user may not interact with it. Mirrors the disabled attribute.

readonly HTMLFormElement form

The <form> element that contains this one.

readonly long length

The number of <option> elements contained by this <select> element. Same as options.length.

boolean multiple

If true, the <select> element allows multiple options to be selected. Otherwise, the selections are mutually exclusive and only one may be selected at a time. Mirrors the multiple attribute.

String name

The name of this form element. Mirrors the name attribute.

readonly HTMLCollection options

An array (HTMLCollection) of HTMLOptionElement objects that represent the <option> elements contained in this <select> element, in the order in which they appear.

long selectedIndex

The position of the selected option in the options array. If no options are selected, this property is -1. If multiple options are selected, this property returns the index of the first selected option.

long size

The number of options to display at once. If this property is 1, the <select> element will typically be displayed using a drop-down menu or list. If it is greater than 1, the <select> is typically displayed using a fixed-size list control, with a scrollbar if necessary. Mirrors the size attribute. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaScript: A Beginner's Guide, Fourth Edition, 4th Edition

JavaScript: A Beginner's Guide, Fourth Edition, 4th Edition

John Pollock
Coding with JavaScript For Dummies

Coding with JavaScript For Dummies

Chris Minnick, Eva Holland

Publisher Resources

ISBN: 0596000480Supplemental ContentCatalog PageErrata