HTMLFormElement.method

HTMLFormElement.method プロパティは、 <form> を送信するために使用される HTTP メソッドを表します。

明示的に指定されない場合、既定のメソッドは 'get' です。

文字列です。

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