HTML DOM Liggaamsvoorwerp
Liggaamsvoorwerp
Die Body-objek verteenwoordig 'n HTML <body>-element.
Toegang tot 'n liggaamsvoorwerp
Jy kan toegang tot 'n <body>-element kry deur getElementsByTagName():
Voorbeeld
var x = document.getElementsByTagName("BODY")[0];
Wenk: Jy kan ook toegang tot 'n <body>-element kry deur die document.body -eienskap te gebruik.
Skep 'n Liggaamsvoorwerp
Jy kan 'n <body> element skep deur die document.createElement() metode te gebruik:
var x = document.createElement("BODY");
Liggaamsvoorwerpeienskappe
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 |
Standaard eiendomme en geleenthede
Die Liggaam voorwerp ondersteun ook die standaard eienskappe en gebeure .
Verwante bladsye
HTML verwysing: HTML <body> tag