Document Property & Method

Document object, properties and method/function associated with it!

Explanation

continue......
more of the properties that can be used with document object to get string url, page modified time, etc..

PropertyDescriptionExample
linkColorProperty "linkColor" is used to set/get value of link attribute of body tag. Code To Get:
var dd = document.linkColor;

Code To Set:

document.linkColor = "afefaa";

Test
lastModifiedProperty "lastModified" is used to get the time at which the document or web page was last modified. Code To Get:
var dd = document.lastModified;

Test
referrerProperty "referrer" is used to get the url or link of the referrer document or web page from which the user has reached this page. Code To Get:
var dd = document.referrer;

Test
titleProperty "title" is used to set or get title of the document using javascript. Code To Get:
var dd = document.getElementsByTagName('title')[0].text;

Code To Set:
document.title = "test title";

Test
urlProperty "url" is used to get the url string of current page or document. Code To Get:
var dd = document.url;

Test
vlinkColorProperty "vlinkColor" is used to get/set the "visited link" color attribute of body tag. Code To Get:
var dd = document.vlinkColor;

Code To Set:
document.vlinkColor = "afafdd";

Test

Ask Questions

Ask Question