Back to Content

FormData: delete() method

files/en-us/web/api/formdata/delete/index.md

latest660 B
Original Source

{{APIRef("XMLHttpRequest API")}} {{AvailableInWorkers}}

The delete() method of the {{domxref("FormData")}} interface deletes a key and its value(s) from a FormData object.

Syntax

js-nolint
delete(name)

Parameters

  • name
    • : The name of the key you want to delete.

Return value

None ({{jsxref("undefined")}}).

Examples

You can delete a key and its values using delete():

js
formData.delete("username");

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also