एचटीएमएल डोम बॉडी ऑब्जेक्ट
शारीरिक वस्तु
बॉडी ऑब्जेक्ट एक HTML <body> तत्व का प्रतिनिधित्व करता है।
बॉडी ऑब्जेक्ट तक पहुंचें
आप getElementsByTagName() का उपयोग करके <body> तत्व तक पहुंच सकते हैं:
उदाहरण
var x = document.getElementsByTagName("BODY")[0];
युक्ति: आप <body> तत्व को document.body गुण का उपयोग करके भी एक्सेस कर सकते हैं।
बॉडी ऑब्जेक्ट बनाएं
आप document.createElement() विधि का उपयोग करके <body> तत्व बना सकते हैं:
var x = document.createElement("BODY");
शरीर वस्तु गुण
Property | Description |
---|---|
aLink | Not supported in HTML5. See CSS :active Selector instead.
Sets or returns the color of an active link in a document |
background | Not supported in HTML5. Use style.backgroundImage instead. Sets or returns the background image for a document |
bgColor | Not supported in HTML5. Use style.backgroundColor instead. Sets or returns the background color of a document |
link | Not supported in HTML5. See CSS :link Selector instead. Sets or returns the color of unvisited links in a document |
text | Not supported in HTML5. Use style.color instead. Sets or returns the color of the text in a document |
vLink | Not supported in HTML5. See CSS :visited Selector instead.
Sets or returns the color of visited links in a document |
मानक गुण और घटनाएँ
बॉडी ऑब्जेक्ट मानक गुणों और घटनाओं का भी समर्थन करता है ।
संबंधित पृष्ठ
एचटीएमएल संदर्भ: एचटीएमएल <बॉडी> टैग