HTMLFormElement: method プロパティ
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.
HTMLFormElement.method
プロパティは、<form>
を送信するために使用される HTTP メソッドを表します。
明示的に指定されなかった場合、既定のメソッドは 'get' です。
値
文字列です。
例
js
document.forms["myform"].method = "post";
const formElement = document.createElement("form"); // フォームを生成
document.body.appendChild(formElement);
console.log(formElement.method); // 'get'
仕様書
Specification |
---|
HTML # dom-fs-method |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
method |
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.