目录

HTML DOM Document charset

Example

Get the character encoding for a document:

encoding = document.charset;
Try it Yourself »

Description

The charset property is deprecated. Do NOT use it.

The charset property may not work in future browsers.


Syntax

document.charset

Return Value

Type Description
String The document's character encoding.