Easy Tutorial
❮ Tag Font Canvas Shadowoffsetx ❯

HTML <button> formaction Attribute

HTML <button> Tag

Example

A form with two submit buttons (with different actions). The first submit button sends the form data to "demo_form.html", and the second submit button sends the form data to "demo_admin.html":


Browser Support

Internet Explorer 10, Firefox, Opera, Chrome, and Safari support the formaction attribute.

Note: Internet Explorer 9 and earlier versions do not support the formaction attribute.


Definition and Usage

The formaction attribute overrides the action attribute of the form element.

This attribute is used with type="submit".


Differences Between HTML 4.01 and HTML5

The formaction attribute is a new attribute in HTML5.


Syntax

Attribute Values

Value Description
URL Specifies the address to which the form data is sent. Possible values: absolute URL - a full page URL address (e.g., href="http://www.example.com/formresult.html)<br> relative URL - a file on the current website (e.g., href="formresult.html)

❮ Tag Font Canvas Shadowoffsetx ❯