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

HTML DOM
DOM 介绍
HTML DOM 举例
DOM 参考
DOM 摘要
HTML DOM 实例
DOM Anchor
DOM Applet
DOM Area
DOM Base 对象
DOM Basefont对象
DOM Body 对象
DOM Document 对象
DOM 事件
DOM Form 对象
DOM Frame 对象
DOM Frameset 对象
DOM History
DOM Iframe 对象
DOM Image 对象
HTML DOM Button对象

HTML DOM rel属性


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

Definition and Usage
定义与用法

The rel property sets or returns the relationship to a forward link.
rel属性可用来设置或返回当前文档与前往连接的关系。

The rel and rev properties work together.
rel和rev属性得一起工作

The rel (relationship) property specifies a relationship to the target. The rev (reverse) property specifies a reverse link from the target document to the current document.
rel属性指定目标关系。rev属性指定反向目标关系

These properties are used by search engines to provide a linked navigation menu.
这些属性被搜索用来提供被连接的导航菜单

Syntax
语法

anchorObject.rel=relationship

Both properties can have one of the following values:
这两个属性可在下面这些值里拥有其中的一个:

Value
Description
描述
appendix Link to the appendix page of a document
连接到文档的附录页
alternate Link to an alternative source
连接到其它来源
bookmark Link to a bookmark. Often used for "permalink" in web blogs
连接到书签。一些blog经常用到的。
chapter Link to a chapter from the current documents
连接到当前文档的标题
contents Link to the table of contents in the current document
连接到当前文档的表格内容
copyright Link to copyright or policy page of the current document
连接到当前文档页著作权或政策部分
glossary Link to glossary page of the document
连接到当前文档的词汇页
index Link to the index page of the current document
连接到当前文档的索引页
next Link to next page from the current document
连接到当前文档的下一页
prev Link to the previous page from the current document
连接到当前文档的前一页
section Link to a section in a list of documents
连接到文档清单列表
start Link to the first page of the current documents. Used by search engines to show the first page
连接到当前文档的第一张页面。
subsection Link to a sub-section in a list of current documents. ( Note that a section can have multiple sub-sections)
连接到当前文档的副清单列表。


Example
举例

The following example returns the relationship of the link:
下面的举例将返回连接的关系:

<html>
<body>
<p><a id="myAnchor" rel="index"
href="http://www.ruanchen.com">Visit ruanchen.com</a></p>
<script type="text/javascript">
x=document.getElementById("myAnchor");
document.write(x.rel);
</script>
</body>
</html>


演练

Get the relationship of a link
得到连接的关系

评论 (0) All

登陆 | 还没注册?