HTMLFormElement.method

The HTMLFormElement.method property represents the HTTP method used to submit the <form>.

Syntax

var string = form.method;
form.method = string;

Example

document.forms['myform'].method = 'post';

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'HTMLFormElement: method' in that specification.
Living Standard

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
methodChrome Full support YesEdge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown