Appends a key/value pair to the FormData object.
So, if we have a FormData object, we're going to call the append method.
You can build a FormData object yourself, instantiating it then appending fields to it by calling its append() method, like this
Usted mismo puede construir un objeto FormData instanciándolo y después añadiendo campos a la instancia usando su método append(), tal y como se muestra
The purpose of a FormData object is to hold values that you're submitting via a form; so, the append method simply takes a key and a value.
El objetivo de un objeto FormData es mantener los valores que envía a través de un formulario; Entonces, el método deappendsimplemente toma una clave y un valor.
Remember, if the browser supports FormData, formdata will be a FormData object; otherwise, it will be false.
Recuerde, si el navegador es compatible con FormData, formdata será un objeto FormData; de lo contrario, será false.
We initialize it to false and then check to see if the browser supports FormData; If it does, we create a new FormData object.
Lo inicializamos en false y luego verificamos si el navegador admite FormData; Si lo hace, creamos un nuevo objeto FormData.
It uses the same format a form would use if the encoding type were set to "multipart/form-data". For details on how to use the FormData object, see Using FormData objects. Constructor
Los datos transmitidos estarán en el mismo formato que usa el método submit() del formulario para enviar los datos si el tipo de codificación del formulario se establece en "multipart/form-data". Creación de un objeto FormData desde cero
With the FormData object, you can create and send a set of key/value pairs and, optionally, files using XMLHttpRequest.
Gracias al objeto FormData, puedes crear y enviar un conjunto de pares de valores/claves y, de forma opcional, archivos mediante XMLHttpRequest.
One of the enhancements to XMLHttpRequest is the introduction of the FormData object.
Una de las mejoras de XMLHttpRequest es la incorporación del objeto FormData.
For details on how to use the FormData object, see Using FormData objects.
Para detalles en cómo utilizar el objeto FormData, vea Usando objetos FormData.
Next, we check for the formdata object.
A continuación, verificamos el objeto formdata.
Optionally, you can pass parameter(s) to the form using the formData object.
Opcionalmente, puede pasar parámetros al form mediante el objeto formData.
By combining the formData object and the Form command, you can send parameters to the form or read parameters from the form at any moment with clean and safe code.
Al combinar el objeto formData y el comando Form, puede enviar parámetros al formulario o leer los parámetros en cualquier momento con código limpio y seguro.