A RetroSearch Logo

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

Search Query:

Showing content from https://developer.mozilla.org/de/docs/Web/API/HTMLOptionsCollection/remove below:

HTMLOptionsCollection: remove()-Methode - Web-APIs | MDN

HTMLOptionsCollection: remove()-Methode

Die remove()-Methode der HTMLOptionsCollection-Schnittstelle entfernt das durch den Index angegebene <option>-Element aus dieser Sammlung.

Syntax Parameter
index

Ein nullbasierter Ganzzahlindex für das HTMLOptionElement in der HTMLOptionsCollection. Wenn der Index nicht gefunden wird, hat die Methode keine Wirkung.

Rückgabewert

Keiner (undefined).

Beispiele
const optionList = document.querySelector("select").options;
const listLength = optionList.length;
optionList.remove(listLength - 1); // removes the last item
optionList.remove(0); // removes the first item
Spezifikationen Browser-Kompatibilität Siehe auch MDN-Feedback-Box War diese Übersetzung hilfreich?

Diese Seite wurde automatisch aus dem Englischen übersetzt.


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