Objeto HTML DOM Ol
Objeto antiguo
El objeto Ol representa un elemento HTML <ol>.
Acceder a un objeto Ol
Puede acceder a un elemento <ol> usando getElementById():
Ejemplo
var x = document.getElementById("myOl");
Crear un objeto Ol
Puede crear un elemento <ol> utilizando el método document.createElement():
Ejemplo
var x = document.createElement("OL");
Propiedades del objeto 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 |
Propiedades y eventos estándar
El objeto Ol también es compatible con las propiedades y los eventos estándar .
páginas relacionadas
Referencia HTML: etiqueta HTML <ol>