HTML form action Attribute
HTML <form> tag
Definition and Usage
The action attribute specifies the URL (web resource) to be loaded when the
submit button is activated.
The form information is sent to the page specified in the action attribute.
Syntax
Syntax Example
<form action="demo_form_action.asp">
|
Attribute Values
Value |
Description |
URL |
The web resource/address to go to when submit button is
used. Possible URL values:
- A relative URL - A page within the site (on the same server), like
action="example.html"
- An absolute URL - A page outside of the site (on another server), like
action="www.example.com"
|
Browser Support
The attribute is supported in all major browsers.
Example
<form action="demo_form_action.asp">
First name:
<input type="text" name="FirstName" value="Peter" />
<br />
Last name:
<input type="text" name="LastName" value="Griffin" />
<br />
<input type="submit" value="Submit" />
</form>
|
Try-It-Yourself Demos
form action
attribute example
Specify the url to send the form data to.
HTML <form> tag
|
|
|