Oggetto HTML DOM Div
Oggetto Div
L'oggetto Div rappresenta un elemento HTML <div>.
Accedi a un oggetto Div
Puoi accedere a un elemento <div> usando getElementById():
Esempio
var x = document.getElementById("myDIV");
Crea un oggetto Div
Puoi creare un elemento <div> usando il metodo document.createElement():
Esempio
var x = document.createElement("DIV");
Proprietà dell'oggetto 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 |
Proprietà ed eventi standard
L'oggetto Div supporta anche le proprietà e gli eventi standard .
Pagine correlate
Esercitazione HTML: Blocchi HTML
Riferimento HTML: tag HTML <div>