Easy Tutorial
❮ Att Object Border Att Tfoot Charoff ❯

HTML <input> formmethod Attribute

HTML <input> Tag

Example

The second submit button overrides the form's HTTP method:


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 for the <input> tag.


Definition and Usage

The formmethod attribute defines the HTTP method for sending form data to the action URL.

The formmethod attribute overrides the method attribute of the <form> element.

Note: The formmethod attribute is used with type="submit" and type="image".

Form data can be sent as URL variables (method="get") or as an HTTP post transaction (method="post").

Notes on the "get" method:

Notes on the "post" method:


Differences Between HTML 4.01 and HTML5

The formmethod attribute is new in HTML5.


Syntax

Attribute Values

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

❮ Att Object Border Att Tfoot Charoff ❯