defaultCharset property (document)
Returns the character set that belongs to the current regional and language settings of the operating system.
To get the character encoding of the document, use the document.charset and the document.characterSet properties. To get the character encoding used for parsing the document, use the inputEncoding property.
You can find the related objects in the Supported by objects section below.
This property is read-only.
String that represents the default character set. For more information, see the page for character sets.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the defaultCharset property:
Did you find this example helpful?
User Contributed Comments