Horje

How to add HTML <button> formmethod get Attribute

get Appends the form-data to the URL: URL?name=value&name=value
index.html
Example: HTML
<form action="/action_page.php" method="get" target="_blank">
  <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>
  <button type="submit">Submit</button>
  <button type="submit" formmethod="get">Submit using POST</button>
</form>

Output should be:

How to add HTML <button> formmethod get Attribute




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin