Horje

Example of HTML form method Attribute in Input

A form with two submit buttons. The first sends the form-data with method="get". The second sends the form-data with method="post":
index.html
Example: HTML
 <form action="/action_page.php" method="get">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname"><br><br>
  <label for="lname">Last name:</label>
  <input type="text" id="lname" name="lname"><br><br>
  <input type="submit" value="Submit using GET">
  <input type="submit" formmethod="post" value="Submit using POST">
</form> 

Output should be:

Example of HTML form method Attribute in Input




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Input Attributes
Uploaded by:
Admin