A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/HTMLSelectElement/add below:

add ยท WebPlatform Docs

add Summary

Adds an option element to the select element.

Method of dom/HTMLSelectElementdom/HTMLSelectElement

Syntax
 select.add(element, beforeElement);
Parameters element
Data-type
DOM Node

The option element to add.

beforeElement
Data-type
DOM Node

The element before which the new option will be placed. If no value is given, the method places the element at the end of the collection.

Return Value

No return value

Usage
 This method adds an option element to a select block.
Notes

Before you can add an element to a collection, you must create it first by using the createElement method.

Related specifications
DOM Level 2 HTML
Recommendation
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4