您现在的位置: 365建站网 > 建站教程 > JavaScript 教程 > HTML DOM charset 方法

HTML DOM charset 方法

此节有 165 人学习过     参与评论

定义和用法

The charset property sets or returns the character encoding of the target URL.

语法

</>code

  1. linkObject.charset=character-encoding

实例

The following example sets the character encoding of the target URL:

</>code

  1. <html>
  2. <head>
  3. <link rel="stylesheet" type="text/css" id="style1"
  4. href="try_dom_link.css" />
  5. </head>
  6. <body>
  7. <script type="text/javascript">
  8. x=document.getElementById("style1");
  9. x.charset="ISO-8859-1";
  10. document.write("Charset=" + x.charset);
  11. </script>
  12. </body>
  13. </html>

如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛

发表评论 (165人查看0条评论)
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
昵称:
最新评论
------分隔线----------------------------
JavaScript 教程目录

快速入口

· 365软件
· 杰创官网
· 建站工具
· 网站大全

其它栏目

· 建站教程
· 365学习

业务咨询

· 技术支持
· 服务时间:9:00-18:00
365建站网二维码

Powered by 365建站网 RSS地图 HTML地图

copyright © 2013-2024 版权所有 鄂ICP备17013400号