A form with two submit buttons. The first submit button submits the form data to "action_page.php", and the second submits to "action_page2.php":
The numbers in the table specify the first browser version that fully supports the attribute.
<button type="submit" formaction="URL">
Value | Description |
---|---|
URL | Specifies where to send the form data.
Possible values:
|
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<h1>The button formaction attribute</h1>
<form action="/action_page.php" method="get">
<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" formaction="/action_page2.php">Submit to another page</button>
</form>
</body>
</html>
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Tag |
Uploaded by: | Admin |