<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>W3C菜鸟教程(w3cdata.com)</title> </head> <body> <a rel='external nofollow' title=''id="w3cdata" charset="ISO-8859-1" href="//www.w3cdata.com/">菜鸟教程</a><br> <script> document.write("返回链接的charset: "); document.write(document.getElementById('w3cdata').charset); document.write("<br><br>"); </script> <a rel='external nofollow' title=''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> </body> </html>