Web APIs
FormData.append()
Add another entry without replacing existing entries with the same name. Values are strings or Blob objects; filename applies to a Blob. Example console output: ["red","blue"].
Formal Syntax & Structure
javascript syntaxjavascript
data.append(name, value[, filename])Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| name | string | Field name. |
| value | string or Blob | Entry value. |
| filename | string | Filename for Blob entries. |
Return Value
undefined
No result value.
Working Example
Example Snippetjavascript
const data=new FormData(); data.append("tag","red"); data.append("tag","blue"); console.log(JSON.stringify(data.getAll("tag")));