HTMLInputElement: formEnctype プロパティ

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.

formEnctypeHTMLInputElement インターフェイスのプロパティで、<input> タグのformEnctype属性がフォーム送信の方法として指定されている場合、サーバーに送信されるコンテンツの MIME タイプです。これは、<input>formenctype 属性の値を反映します。

このプロパティは、 submit または image 型の <input> 要素でのみ有効です。

この値は、フォームが入力経由で送信された場合、 HTMLFormElement インターフェイスの enctype プロパティを上書きします。このプロパティは取得することも設定することもできます。設定されていない場合、値は空文字列 ("") となります。

文字列です。

js
inputElement.formEnctype = "application/x-www-form-urlencoded";

仕様書

Specification
HTML
# dom-fs-formenctype

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
formEnctype

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報