English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This article introduces the HTML form action attribute, which specifies where to send the form data when the form is submitted, with an online example demonstrating how to use the HTML form action attribute, browser compatibility, syntax definition, and detailed information about its attribute values.
After submission, the form data will be sent to the file named "action_page.php" (to process the submitted data):
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <form> action attribute usage-基础教程(oldtoolbag.com)</title> </head> <body> <form action="action_page.php"> First name: <input type="text" name="FirstName" value="Mickey"><br> Last name: <input type="text" name="LastName" value="Mouse"><br> <input type="submit" value="Submit"> </form> <p>Click the "Submit" button, and the form data will be sent to the server page named "action_page.php".</p> </body> </html>Test it out ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the action attribute.
The action attribute specifies where to send form data when a form is submitted.
In HTML5 In HTML, the action attribute is no longer required.
<form action="URL">
Value | Description |
---|---|
URL | Where to send form data when the form is submitted. Possible values:
|