Objeto de división HTML DOM
Objeto div.
El objeto Div representa un elemento HTML <div>.
Acceder a un objeto Div
Puede acceder a un elemento <div> usando getElementById():
Ejemplo
var x = document.getElementById("myDIV");
Crear un objeto Div
Puede crear un elemento <div> utilizando el método document.createElement():
Ejemplo
var x = document.createElement("DIV");
Propiedades del objeto Div
Property | Description |
---|---|
align | Not supported in HTML5. Use
style.textAlign instead. Sets or returns the value of the align attribute of the <div> element |
Propiedades y eventos estándar
El objeto Div también es compatible con las propiedades y los eventos estándar .
páginas relacionadas
Tutorial HTML: Bloques HTML
Referencia HTML: etiqueta HTML <div>