HTMLFormElement.method
値
文字列です。
例
document.forms['myform'].method = 'post';
const formElement = document.createElement("form"); // フォームを生成
document.body.appendChild(formElement);
console.log(formElement.method); // 'get'
仕様書
Specification |
---|
HTML Standard # dom-fs-method |
ブラウザーの互換性
BCD tables only load in the browser