HTMLFormElement: enctype-Eigenschaft
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.
Die HTMLFormElement.enctype
Eigenschaft ist der MIME-Typ des Inhalts, der verwendet wird, um das Formular an den Server zu senden. Mögliche Werte sind:
application/x-www-form-urlencoded
: Der anfängliche Standardtyp.multipart/form-data
: Der Typ, der es erlaubt, durch<input>
Element(e) Dateidaten hochzuladen.text/plain
: Mehrdeutiges Format, menschenlesbare Inhalte, die für Computer nicht zuverlässig interpretierbar sind.
Dieser Wert kann durch ein formenctype
Attribut auf einem <button>
oder <input>
Element überschrieben werden.
Wert
Ein String.
Beispiele
js
form.enctype = "application/x-www-form-urlencoded";
Spezifikationen
Specification |
---|
HTML # dom-fs-enctype |
Browser-Kompatibilität
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.