HTMLButtonElement: formMethod プロパティ
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
formMethod
は HTMLButtonElement
インターフェイスのプロパティで、この <button>
要素がこのフォーム (<form>
) を送信するコントロールである場合に、フォームを送信するコントロールである場合、送信に使用される HTTP メソッドです。これは、この <button>
の formmethod
属性の値を反映します。
この値は、フォームが入力経由で送信された場合、 HTMLFormElement
インターフェイスの method
プロパティを上書きします。このプロパティは取得することも設定することもできます。空の値または不正な値を設定すると、不正な既定値として "get"
が使用されます。設定されていない場合、値は空文字列 (""
) となります。
値
文字列で、"post"
, "get"
, "dialog"
, ""
のいずれかです。
例
js
btnEl.formMethod = "post";
仕様書
Specification |
---|
HTML # dom-fs-formmethod |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
formMethod |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.