简单教程
提交运行
代码编辑器:
<a id="twle" charset="ISO-8859-1" href="//www.twle.cn/">简单教程</a><br> <script> document.write("返回链接的charset: "); document.write(document.getElementById('twle').charset); document.write("<br><br>"); </script> <a id="google" href="//www.google.com/">Google</a><br> <script> document.getElementById('google').charset="utf-8"; document.write("设置链接的charset: "); document.write(document.getElementById('google').charset); </script>
运行结果: