HTML Forms: Total Domination
Sobre a Aula

Let’s explore the HTML element <input type=”submit”>, known as the “Submit” button in web forms.

This element plays a critical role in allowing users to send the data entered in the form to a specific location, called a form handler.

The “Submit” button is crucial in online forms, as when it is pressed, it triggers the sending of all collected information to a form handler.

This handler is typically a file located on the web server that contains a script responsible for processing the data sent by the user.

When filling out an online form, such as a registration or contact form, the “Submit” button is the final step, indicating that the user has completed the filling out and is ready to submit the information.

Once pressed, the data is forwarded to the form handler, which processes it according to the instructions defined in the script.

It is important to note that the form handler is specified in the action attribute of the <form> element. This attribute indicates the location to where the data should be sent.

Having a clear understanding of this interaction between the “Submit” button and the form handler is essential for beginner developers who are starting to work with the logic behind sending data in web pages.

Explanation:

<form action="/action_page.php">
  <label for="fname">First name:</label><br>
  <input type="text" id="fname" name="fname" value="John"><br>
  <label for="lname">Last name:</label><br>
  <input type="text" id="lname" name="lname" value="Doe"><br><br>
  <input type="submit" value="Submit">
</form>
Entrar na conversa
Rolar para cima