Form acceptCharset Property
Return the character-set the server should use for form submission:
The result of x will be:
Definition and Usage
The acceptCharset property sets or returns the value of the accept-charset attribute in a form element.
The accept-charset attribute specifies the character-sets that are to be used for the form submission.
The default value is the reserved string "UNKNOWN" (indicates that the encoding equals the encoding of the document containing the <form> element).
The acceptCharset property is supported in all major browsers.
Return the acceptCharset property:
Set the acceptCharset property:
|character-set||A space- or comma-separated list of one or more character encodings that are to be
used for the form submission.
In theory, any character encoding can be used, but no browser understands all of them. The more widely a character encoding is used, the better the chance that a browser will understand it.
To view all available character encodings, go to our Character sets reference.
|Return Value:||A String, representing the character set(s) that the server should use for form submission|
Change the value of the accept-charset attribute in a form to UTF-8:
HTML reference: HTML <form> accept-charset attribute