当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM charset属性
The charset property sets or returns the character-set of the linked resource.
charset属性可设置或返回所链资源的character-set(字符集)
anchorObject.charset=charset |
The following example sets the character-set of the linked resource:
下面的举例将设置所链资源的字符集
<html> <body> <p> <a id="myAnchor" href="http://www.w3schools.com">W3Schools.com</a> </p> <script type="text/javascript"> x=document.getElementById("myAnchor"); x.charset="ISO-8859-1"; </script> </body> </html> |
Set the character-set of a linked resource
设置所链资源的character-set值