Definition and Usage..
The inputEncoding property returns the character encoding for the document.
The character encoding is the character set used for rendering the document, which may differ from the encoding specified by the page (the user can override the encoding).
The inputEncoding property returns the character encoding at the time of parsing, and will return null if the document is created in memory.
Syntax: document.inputEncoding
CODING:The inputEncoding property returns the character encoding for the document.
The character encoding is the character set used for rendering the document, which may differ from the encoding specified by the page (the user can override the encoding).
The inputEncoding property returns the character encoding at the time of parsing, and will return null if the document is created in memory.
Syntax: document.inputEncoding
<!DOCTYPE html>
<html>
<body>
<p>Click the button to check the encoding of this document</p>
<button onclick="myFunction()">Try it</button>
<p><strong>Note:</strong> Internet explorer 8 and earlier does not support the inputEncoding property.</p>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.inputEncoding;//document.characterSet;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>
<html>
<body>
<p>Click the button to check the encoding of this document</p>
<button onclick="myFunction()">Try it</button>
<p><strong>Note:</strong> Internet explorer 8 and earlier does not support the inputEncoding property.</p>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.inputEncoding;//document.characterSet;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>
Comments
Post a Comment