Name
Select.add( ) — Fügt ein <option>-Element einDOM Level 2 HTML
Überblick
void add(HTMLElementelement, HTMLElementvor) throws DOMException;
Argumente
elementDas hinzuzufügende Option-Element.
vorDas Element des
options-Arrays, vor dem das neueelementeingefügt werden soll. Wenn dieses Argumentnullist, wirdelementam Ende desoptions-Arrays angefügt.
Exceptions
Diese Methode löst eine DOMException mit dem code
NOT_FOUND_ERR aus, wenn das Argument
vor ein Objekt angibt, das kein Element
des options-Arrays ist.
Beschreibung
Diese Methode fügt diesem
<select>-Element ein neues
<option>-Element hinzu.
element ist ein Option-Objekt, das das
hinzuzufügende <option>-Element darstellt.
vor gibt an, vor welcher Option das
element eingefügt werden soll. ...
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.
Read now
Unlock full access