JavaScript Reference/Javascript Properties/rel

Материал из Web эксперт
Версия от 08:21, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"rel" Example

    
<html>
<body>
<a id="myLink" href="examples.css" target="_blank">
The style sheet attached to this document
</a> 
<script language="JavaScript">
    document.getElementById("myLink").rel = "stylesheet";
</script>
</body>
</html>



"rel" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <link>                        |
+----------------+--------------------------------------------------------------+



"rel" Possible Values

Possible Values
Alternate            a substitute file
Appendix             an appendix page
Bookmark,
Chapter,             a chapter page
Contents             the table of contents
Copyright, 
Glossary, 
Help, 
Index                the index page
Next                 the next page
Prev                 the previous page
Section              a page that is a section of a group of pages
Shortcut Icon        the href to an icon
Start                the first page
Stylesheet, 
Subsection           a subsection page



"rel" Syntax and Note

Note:
Read and write property. 
Sets the relationship between element and its href attribute. 
    
Syntax:
    
document.getElementById("elementID").rel = value
document.all.elementID.rel = value // IE only