Firefox Tomorrow

web api instance method

FormData: values() method

View on MDN ↗

Available in workers

The FormData.values() method returns an iterator which iterates through all values contained in the FormData. The values are strings or Blob objects.

Syntax

values()

Parameters

None.

Return value

An iterator of FormData’s values.

Examples

const formData = new FormData();
formData.append("key1", "value1");
formData.append("key2", "value2");

// Display the values
for (const value of formData.values()) {
  console.log(value);
}

The result is:

value1
value2

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also