Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML input formaction attribute

HTML formaction attribute

HTML input Tag Reference HTML tag

Example

An HTML form with two submit buttons (different action values):

First name:

Last name:


Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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

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


Definition and Usage

The formaction attribute specifies the URL of the file that processes the input control when the form is submitted.

The formaction attribute overrides the

elements' action attribute.

**Note:** The formaction attribute applies to type="submit" and type="image".


Differences between HTML 4.01 and HTML5

The formaction attribute is new in HTML5.


Syntax

Attribute values

Value Description
URL Specifies the URL of the file that processes the input control when the form is submitted.

Possible values:

  • Absolute URL - the full address of a page (such as href="http://www.example.com/formresult.html")
  • Relative URL - points to a file within the current site (such as href="formresult.html")
  • |

    HTML input Tag Reference HTML tag