Objet HTML DOM Ol
Objet Ol
L'objet Ol représente un élément HTML <ol>.
Accéder à un objet Ol
Vous pouvez accéder à un élément <ol> en utilisant getElementById() :
Exemple
var x = document.getElementById("myOl");
Créer un objet Ol
Vous pouvez créer un élément <ol> en utilisant la méthode document.createElement() :
Exemple
var x = document.createElement("OL");
Ol Propriétés de l'objet
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 |
Propriétés et événements standard
L'objet Ol prend également en charge les propriétés et événements standard .
Pages connexes
Référence HTML : balise HTML <ol>