HTML DOM Link 对象

Link 对象

Link 对象代表某个 HTML 的 <link> 元素。<link> 元素可定义两个链接文档之间的关系。

<link> 元素被定义于 HTML 文档的 head 部分。

IE: Internet Explorer, F: Firefox, O: Opera, W3C: World Wide Web Consortium (Internet Standard).

Link Object Properties

属性 描述 IE F O W3C
charset 设置或返回目标 URL 的字符编码 4 1 9 Yes
disabled 设置或返回目标 URL 是否当被禁用 4 1 9 Yes
href 设置或返回被链接资源的 URL 4 1 9 Yes
hreflang 设置或返回目标 URL 的基准语言 4 1 9 Yes
id 设置或返回某个 <link> 元素的 id 4 1 9 Yes
media 设置或返回文档显示的设备类型 6 1 9 Yes
name 设置或返回 <link> 元素的名称 4 No No Yes
rel 设置或返回当前文档与目标 URL之间的关系 4 1 9 Yes
rev 设置或返回目标 URL 与当前文档之间的关系 4 1 9 Yes
type 设置或返回目标 URL 的 MIME 类型 4 1 9 Yes

Standard Properties

Property Description IE  F O W3C
dir Sets or returns the direction of text 5 1 9 Yes
lang Sets or returns the language code for an element 5 1 9 Yes