Name
encoding — NN 2 IE 3 DOM n/a
Synopsis
Read/Write
The MIME type for the data being submitted to the server with the
form. For typical form submissions (where the
METHOD
attribute is set to
post
), the default value is the proper content
type. But if you change the action
property for a
form by script, consider whether you require a custom encoding for
the purpose. The DOM working draft indicates it may prefer to name
this property encType
to more closely mirror the
tag attribute.
Note that the encoding
property is not modifiable
in Internet Explorer 3.
Example
document.orderForm.encoding = "text/plain"
Value
Case-insensitive MIME type (content type) value as a string. For multiple items, a comma-delimited list is allowed in a single string.
Default
application/x-www-form-urlencoded
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.