HTML DOM HR- object
HR-object
Het HR-object vertegenwoordigt een HTML <hr>-element.
Toegang tot een HR-object
U kunt toegang krijgen tot een <hr>-element met getElementById():
Voorbeeld
var x = document.getElementById("myHR");
Een HR-object maken
U kunt een <hr>-element maken met behulp van de document.createElement()-methode:
Voorbeeld
var x = document.createElement("HR");
Eigenschappen HR-object
Property | Description |
---|---|
align | Not supported in HTML5. Use style.textAlign instead. Sets or returns the alignment of a horizontal line |
color | Not supported in HTML5. Use style.color instead. Sets or returns the color of a horizontal line |
noshade | Not supported in HTML5. Sets or returns whether a horizontal line should render in one solid color (noshaded) |
size | Not supported in HTML5. Use style.height instead. Sets or returns the height of a horizontal line |
width | Not supported in HTML5. Use style.width instead. Sets or returns the width of a horizontal line |
Standaard eigenschappen en evenementen
Het HR-object ondersteunt ook de standaard eigenschappen en gebeurtenissen .
Gerelateerde pagina's
HTML-referentie: HTML <hr>-tag