Javascript Reference
Categories: LINK

javascript LINK rel

@Aug. 17, 2009, 9:47 a.m.
rel Firefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 1  

 

Read/Write  

Defines the relationship between the current element and the external item pointed to by the link. Also known as a forward link, not to be confused in any way with the destination document whose address is defined by the href attribute. This property is not fully exploited in mainstream browsers, but you can treat the attribute as a kind of parameter to be checked and/or modified under script control. See the discussion of the a element's rel attribute for a glimpse of how this property may be used in the future.

 
Example
 
if (document.getElementById("link3").rel == "alternate stylesheet") {
    // process for alternate style sheet
}
 
Value

Case-insensitive, space-delimited list of HTML 4 standard link types (as a single string) applicable to the element. Sanctioned link types are:

 
alternate appendix bookmark chapter
contents copyright glossary help
index next prev section
start stylesheet subsection  
 
Default

None.


Powered by Linode.