Definition and Usage The action attribute specifies the URL (web resource) to be loaded when the submit button is activated. The form info...
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="Harry" />
<br />
Last name:
<input type="text" name="LastName" value="Potter" />
<br />
<input type="submit" value="Submit" />
</form> |