Submit a form using the "get" method.
The method
attribute specifies how to send form-data (the form-data is sent to the page specified in the action
attribute).
The form-data can be sent as URL variables (with method="get"
) or as HTTP post transaction (with method="post"
).
Notes on GET:
Notes on POST:
<form method="get|post">
Value | Description |
---|---|
get | Default. Appends the form-data to the URL in name/value pairs: URL?name=value&name=value |
post | Sends the form-data as an HTTP post transaction |
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>
<input type="submit" value="Submit">
</form>
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Tag |
Uploaded by: | Admin |