FormData: values() Methode
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since Oktober 2018.
Hinweis: Diese Funktion ist in Web Workers verfügbar.
Die FormData.values()
-Methode gibt einen Iterator zurück, der durch alle Werte iteriert, die in der FormData
enthalten sind. Die Werte sind Strings oder Blob
-Objekte.
Syntax
js
values()
Parameter
Keine.
Rückgabewert
Beispiele
js
const formData = new FormData();
formData.append("key1", "value1");
formData.append("key2", "value2");
// Display the values
for (const value of formData.values()) {
console.log(value);
}
Das Ergebnis ist:
value1 value2
Spezifikationen
This feature does not appear to be defined in any specification.>Browser-Kompatibilität
Loading…