The FormData interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
The append() method of the FormData interface appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist.
The delete() method of the FormData interface deletes a key and its value(s) from a FormData object.
The FormData.entries() method returns an iterator allowing to go through all key/value pairs contained in this object. The key of each pair is a USVString object; the value either a USVString, or a Blob.
The FormData() constructor creates a new FormData object.
The get() method of the FormData interface returns the first value associated with a given key from within a FormData object. If you expect multiple values and want all of them, use the getAll() method instead.
The getAll() method of the FormData interface returns all the values associated with a given key from within a FormData object.
The has() method of the FormData interface returns a boolean stating whether a FormData object contains a certain key.
The FormData.keys() method returns an iterator allowing to go through all keys contained in this object. The keys are USVString objects.
The set() method of the FormData interface sets a new value for an existing key inside a FormData object, or adds the key/value if it does not already exist.
The FormData object lets you compile a set of key/value pairs to send using XMLHttpRequest. It is primarily intended for use in sending form data, but can be used independently from forms in order to transmit keyed data. The transmitted data is in the same format that the form's submit() method would use to send the data if the form's encoding type were set to multipart/form-data.
The FormData.values() method returns an iterator allowing to go through all values contained in this object. The values are USVString or Blob objects.