Objeto HTML DOM Ol
Objeto antigo
O objeto Ol representa um elemento HTML <ol>.
Acesse um objeto Ol
Você pode acessar um elemento <ol> usando getElementById():
Exemplo
var x = document.getElementById("myOl");
Criar um objeto Ol
Você pode criar um elemento <ol> usando o método document.createElement():
Exemplo
var x = document.createElement("OL");
Propriedades do Objeto
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 |
Propriedades e eventos padrão
O objeto Ol também suporta as propriedades e eventos padrão .
Páginas relacionadas
Referência HTML: tag HTML <ol>