HTMLFormElement
The interface for <form>. Extends HTMLElement → Element.
Reflected properties
All setters are guarded and throw NoModificationAllowedError on a read-only document.
| Property | Attribute | Type | Notes |
|---|---|---|---|
action |
action |
string | Reflects the content attribute verbatim. |
method |
method |
enum | Keywords: get · post · dialog. Missing → "get"; invalid → "get". |
name |
name |
string | Reflects the content attribute verbatim. |
target |
target |
string | Reflects the content attribute verbatim. |
enctype |
enctype |
enum | Keywords: application/x-www-form-urlencoded · multipart/form-data · text/plain. Missing → "application/x-www-form-urlencoded"; invalid → "application/x-www-form-urlencoded". |
acceptCharset |
accept-charset |
string | Reflects the content attribute verbatim. |
See also
- Element —
getAttribute/setAttribute, content,classList, traversal, insertion - HTMLElement — the global reflected properties every HTML element inherits
- JavaScript DOM API — the interface hierarchy and
instanceof