Objekt HTML DOM HR
Objekt HR
Objekt HR představuje prvek HTML <hr>.
Přístup k objektu HR
K prvku <hr> se dostanete pomocí getElementById():
Příklad
var x = document.getElementById("myHR");
Vytvořte objekt HR
Element <hr> můžete vytvořit pomocí metody document.createElement():
Příklad
var x = document.createElement("HR");
Vlastnosti objektu HR
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 |
Standardní vlastnosti a události
Objekt HR také podporuje standardní vlastnosti a události .
Související stránky
HTML reference: HTML značka <hr>