Leakbali
w3 Tutorial, Web Tutorial
Switch to English Bahasa Indonesia 
Register   Login

Reference


Document Object Reference

Document Object

Each HTML document loaded into a browser window becomes a Document object. The Document object provides access to all HTML elements in a page, from within a script.

Tip: The Document object is also part of the Window object, and can be accessed through the window.document property.

Document Object Collections

Collection Description W3C
anchors[] Returns an array of all the anchors in the document Yes
forms[] Returns an array of all the forms in the document Yes
images[] Returns an array of all the images in the document Yes
links[] Returns an array of all the links in the document Yes


Document Object Properties

Property Description W3C
cookie Returns all name/value pairs of cookies in the document Yes
documentMode Returns the mode used by the browser to render the document No
domain Returns the domain name of the server that loaded the document Yes
lastModified Returns the date and time the document was last modified No
readyState Returns the (loading) status of the document No
referrer Returns the URL of the document that loaded the current document Yes
title Sets or returns the title of the document Yes
URL Returns the full URL of the document Yes


Document Object Methods

Method Description W3C
close() Closes the output stream previously opened with document.open() Yes
getElementById() Accesses the first element with the specified id Yes
getElementsByName() Accesses all elements with a specified name Yes
getElementsByTagName() Accesses all elements with a specified tagname Yes
open() Opens an output stream to collect the output from document.write() or document.writeln() Yes
write() Writes HTML expressions or JavaScript code to a document Yes
writeln() Same as write(), but adds a newline character after each statement Yes

References

About Us

Home
About Us
Contact Us
Sitemap

Tools

Google PageRank
Alexa Rank
Keywords Density

Accounts

Register Account
Login
Valid XHTML 1.0 TransitionalValid CSS!
Web Directory


2006 - 2012 © Leakbali.com - Free Web Tutorial, Free Web Articles, Web Sharing, Source Codes, Web References