HTMLSelectElement
A HTML Element. These elements also share all of the properties and methods of other HTML elements via the HTMLElement interface.
§Extends
§Index Signatures
§Properties
Retrieves a reference to the form that the object is embedded in.
Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
Returns an HTMLOptionsCollection of the list of options.
Retrieves the type of select control based on the value of the MULTIPLE attribute.
Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
Returns a ValidityState object that represents the validity states of an element.
§Methods
Adds an element to the areas, controlRange, or options collection.
Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
Returns whether a form will validate when it is submitted, without having to submit it.
Retrieves a select object or an object from an options collection.
Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
Retrieves a select object or an object from an options collection.
A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.
Removes an element from the collection.
Number that specifies the zero-based index of the element to remove from the collection.