Syntax
js
get(name)
Parameters
name-
A string representing the name of the key you want to retrieve.
Return value
A value whose key matches the specified name. Otherwise, null.
Examples
If we add two username values to a FormData using append():
js
formData.append("username", "Chris");
formData.append("username", "Bob");
The following get() method will only return the first username value:
js
formData.get("username"); // Returns "Chris"
Specifications
| Specification |
|---|
| XMLHttpRequest # dom-formdata-get |