Objekt HTML DOM Ol
Ol Object
Objekt Ol představuje HTML element <ol>.
Přístup k Ol objektu
K prvku <ol> můžete přistupovat pomocí getElementById():
Příklad
var x = document.getElementById("myOl");
Vytvořte Ol objekt
Element <ol> můžete vytvořit pomocí metody document.createElement():
Příklad
var x = document.createElement("OL");
Vlastnosti objektu Ol
Property | Description |
---|---|
compact | Not supported in HTML5. Use style.lineHeight instead. Sets or returns whether the list should render smaller than normal, or not |
reversed | Sets or returns whether the list order should be descending or not |
start | Sets or returns the value of the start attribute of an ordered list |
type | Sets or returns the value of the type attribute of an ordered list |
Standardní vlastnosti a události
Objekt Ol také podporuje standardní vlastnosti a události .
Související stránky
HTML reference: HTML značka <ol>