Exforsys.com
 
Home Tutorials JavaScript
 

JavaScript Document Object Properties

 

Properties: layers, linkColor, links, plugins and referrer

Page 2 of 3


layers:

When a programmer wants to refer all the Layer objects in a current document, then he or she can make use of the layers property. The layers property is an array that gives reference to all Layer objects associated with the current document.



General syntax for using the layers property is as follows:



document.layers["layerID"]



linkColor:

Just as there is an option to define the color of an active link there is also an option to define the color of hyperlinks in a document. The linkColor property can be used to define the color of hyperlinks in a document.


The general syntax for using the linkColor property of document object is as follows:



document.linkColor = "Information of color"



Here, the "Information of color" is a string that is given either as a hexadecimal representation or directly as a literal description denoting the color of the hyperlink link needed.


links:

The links property is an array that gives reference to all the Area and Link objects in the current document.


General syntax for using the links property of a document object is as follows:



document.links["ID_of_link"]



plugins:

When a programmer wants to refer all the Plugin objects to a current document then he or she can make use of this plugins property. The plugins property is an array that gives reference to all Plugin objects associated with the current document.


General syntax for using the plugins property is as follows:



document.plugins["pluginID"]



referrer:

Just as we had the domain property to return the domain name of the document if the programmer wants to have the URL of the document that loaded the current document, then the referrer property can be used. If a destination document is reached when a user clicks on a Link object in another document (the referrer) then, when the referrer property is used, this returns to the referring document's URL.


General syntax for using the referrer property of document object is as follows:



document.referrer





Next Page: Properties: title, URL and vlinkColor


Read Next: JavaScript Document Object Methods Part I



 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links

 

Subscribe via RSS


Get Daily Updates via Subscribe to Exforsys Free Training via email


Get Latest Free Training Updates delivered directly to your Inbox...

Enter your email address:


 

Subscribe to Exforsys Free Training via RSS
 

 
Partners -  Privacy and Legal Policy -  Site News -  Contact   Sitemap  

Copyright © 2000 - 2009 exforsys.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape