当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM charset属性

HTML DOM
DOM TableRow 对象
DOM Textarea 对象
DOM Window 对象

HTML DOM charset属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 451 ::
收藏到网摘: n/a

Definition and Usage
定义与用法

The charset property sets or returns the character-set of the linked resource.
charset属性可设置或返回所链资源的character-set(字符集)

Syntax
语法

anchorObject.charset=charset


Example
举例

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值

评论 (0) All

登陆 | 还没注册?