--- id: bad87fee1348bd9aedd08830 title: Add a Submit Button to a Form challengeType: 0 guideUrl: 'https://spanish.freecodecamp.org/guide/certificates/add-a-submit-button-to-a-form' videoUrl: '' localeTitle: Agregar un botón de envío a un formulario --- ## Description
Agreguemos un botón de submit a su formulario. Al hacer clic en este botón, los datos de su formulario se enviarán a la URL que especificó con el atributo de action su formulario. Aquí hay un ejemplo de botón de envío: <button type="submit">this button submits the form</button>
## Instructions
Agregue un botón como el último elemento de su elemento de form con un tipo de submit y "Enviar" como texto.
## Tests
```yml tests: - text: Su formulario debe tener un botón en su interior. testString: 'assert($("form").children("button").length > 0, "Your form should have a button inside it.");' - text: Su botón de envío debe tener el type atributo establecido para submit . testString: 'assert($("button").attr("type") === "submit", "Your submit button should have the attribute type set to submit.");' - text: Su botón de enviar solo debe tener el texto "Enviar". testString: 'assert($("button").text().match(/^\s*submit\s*$/gi), "Your submit button should only have the text "Submit".");' - text: Asegúrese de que el elemento de su button tenga una etiqueta de cierre. testString: 'assert(code.match(/<\/button>/g) && code.match(/
## Challenge Seed
```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
```
## Solution
```js // solution required ```