Document inputEncoding Property - Javascript DOM

Javascript examples for DOM:Document inputEncoding

Description

The inputEncoding property returns the character encoding for the document.

This property is an alias of document.characterSet.

Return Value

A String, representing the document's character encoding

The following code shows how to Display the character encoding for this document:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<button onclick="myFunction()">check the encoding of this document</button>

<p id="demo"></p>

<script>
function myFunction() {// w w  w.  j  av  a2 s.  co  m
    var x = document.inputEncoding;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials