HTMLFormElement: enctype プロパティ
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.enctype
プロパティは、サーバーにフォームを送信するために使用されるコンテンツの MIME タイプを指定します。使用可能な値は以下の通りです。
application/x-www-form-urlencoded
: 初期値(既定値)です。multipart/form-data
:<input>
要素にファイルデータをアップロードできるようにする型。text/plain
: 形式があいまいで、人間が読み取り可能なコンテンツであり、コンピューターで確実に解釈できるとは限りません。
この値は formenctype
属性を <button>
または <input>
要素に指定することで上書きすることができます。
値
文字列です。
例
js
form.enctype = "application/x-www-form-urlencoded";
仕様書
Specification |
---|
HTML # dom-fs-enctype |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
enctype |
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.