DOM Methods

FormData.values()

Iterates the stored values in entry order. Values are strings or File objects; their field names are not included. Use entries() instead if you must associate each value with its field name. A file value remains a File object, so reading values is not equivalent to serializing the submission as JSON. Example result: ["html","css"].

Formal Syntax & Structure

html syntaxhtml
data.values()

Return Value

iterator

Iterator yielding strings or File objects in entry order.

Working Example

Example Snippethtml
<p>  Result:  <output id="result"></output></p><script>  const result = document.getElementById("result");  (async () => {  const data = new FormData();  data.append("tag", "html");  data.append("tag", "css");  result.textContent = JSON.stringify([...data.values()]);  })().catch(error => { result.textContent = "Error: " + error.name; });</script>
HTML Reference