js得到当前文档的编码:document.characterSet

<!DOCTYPE HTML>
<html >
<head>
<meta charset="utf-8">
<!--meta content="text/html;charset=gbk"-->
<script>
alert("document.charset=>"+document.charset+"\ndocument.defaultCharset=>"+document.defaultCharset+"\ndocument.characterSet=>"+document.characterSet);
</script>
<head>
<body>
</body>
</html>

 

posted @ 2016-01-12 10:52  侠岚之弋痕夕  阅读(959)  评论(0编辑  收藏  举报
Where is the starting point, we don't have a choice, but the destination where we can pursue!