HTML DOM Gövde Nesnesi
Vücut Nesnesi
Body nesnesi bir HTML <body> öğesini temsil eder.
Bir Gövde Nesnesine Erişin
Bir <body> öğesine getElementsByTagName() kullanarak erişebilirsiniz:
Örnek
var x = document.getElementsByTagName("BODY")[0];
İpucu: Bir <body> öğesine, document.body özelliğini kullanarak da erişebilirsiniz .
Bir Vücut Nesnesi Oluşturun
Document.createElement() yöntemini kullanarak bir <body> öğesi oluşturabilirsiniz:
var x = document.createElement("BODY");
Gövde Nesnesi Özellikleri
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 |
Standart Özellikler ve Etkinlikler
Body nesnesi ayrıca standart özellikleri ve olayları da destekler .
İlgili Sayfalar
HTML referansı: HTML <body> etiketi