JavaScript Reference/Javascript Properties/charset
"charset" Example
<html>
<body>
<button onclick="alert(document.charset);">Character Encoding for Document</button>
</body>
</html>
"charset" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<a> document |
| |<link> |
| |<meta> <script> |
+----------------+--------------------------------------------------------------+
"charset" Syntax and Note
Note:
Read and write property.
Sets the the element character set.
Syntax:
document.getElementById("elementID").charset = value
document.all.elementID.charset = value // IE only