Easy Tutorial
❮ Att Form Accept Av Prop Src ❯

HTML <button> formmethod Attribute

HTML <button> Tag

Example

A form with two submit buttons, where the first button submits the form data using method="get", and the second button submits the form data using method="post":


Browser Support

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

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


Definition and Usage

The formmethod attribute specifies the HTTP method used to submit the form data. The formmethod attribute overrides the method attribute of the form element.

The formmethod attribute must be used with type="submit".

Form data can be sent in the following ways:

Using the "get" method:

Using the "post" method:


Differences Between HTML 4.01 and HTML5

The formmethod attribute is a new attribute in HTML5.


Syntax

Attribute Values

Value Description
get Appends the form data (form-data) to the URL: URL?name=value&name=value
post Sends the form data (form-data) as an HTTP post transaction

❮ Att Form Accept Av Prop Src ❯