H I O X INDIA
Javascript Tutorial
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Directories 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)   Bookmarks :-)  
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

Java-Script Tutorial
Introduction
Variables
Operators
Statements
Loops
Functions
Objects
Arrays
Browser Objects
Form DOM
Ask Your Doubts
Feedback





Document Property & Method


Topic

Document object, properties associated with it!



Explanation
continue...
more properties that can be used with document object.
PropertyDescriptionExample
embeds Property "embeds" is return an array containing all the plugins contained in the document. Code To Get:
var dd = document.embeds;
alert(dd.length);

Test
fgColor Property "fgColor" is used to set/get the foreground color attribute of body tag. Code To Get:
var dd = document.fgColor;

Code To Set:
document.fgColor = "fefaaa";

Test
form Property "form" is the object reference of a form object contained in the document.  
forms Property "forms" is used to get an array of all the form objects in the document page. Code To Get:
var dd = document.forms;
var length1 = dd.length;

Test
image Property "image" is the object reference of an image object contained in the document.  
images Property "images" is used to get an array of all the image objects in the document or web page. Code To Get:
var dd = document.images;
var img = dd[0].width;

Test
link Property "link" is the object reference of a link object contained in the document.  
links Property "links" is used to get an array of all the link objects in the document or web page. Code To Get:
var dd = document.links;
var link1 = dd[0];

Test
more properties in the next page.....


        Javascript (JS) is one of the most used languages in the world. Some times spelled as Java Script. Hope you enjoy this tutorial. Do send your feedback or suggestions on this javascript or java script tutorial. This is a copyright content.

others

privacy policy     license     sitemap
© 2004-2005 HIOX INDIA - hioxindia.com

Other Links