Search w3schools.com:

SHARE THIS PAGE

DOM Document inputEncoding Property

Document Object Reference Document Object

Example

Display the character encoding for this document:

document.inputEncoding;

The result will be:

ISO-8859-1

Try it yourself »

Definition and Usage

The inputEncoding property returns the character encoding for the document.

The inputEncoding property returns the character encoding at the time of parsing, and will return null if the document is created in memory.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The inputEncoding property is supported in all major browsers, except for Opera.

Note: Internet explorer 8 and earlier does not support this property.


Syntax

document.inputEncoding

Technical Details

Return Value: A String, representing the document's character encoding
DOM Version Core Level 3


Document Object Reference Document Object


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]