1
<a id="w3s" charset="ISO-8859-1" href="https://www.mifengjc.com/">Mifengjc</a><br>
2
<script>
3
document.write("返回链接的charset: ");
4
document.write(document.getElementById('w3s').charset);
5
document.write("<br><br>");
6
</script>
7
<a id="google" href="http://www.google.com/">Google</a><br>
8
<script>
9
document.getElementById('google').charset = "utf-8";
10
document.write("设置链接的charset: ");
11
document.write(document.getElementById('google').charset);
12
</script>