Node.lastChild
La proprietà di sola lettura Node.lastChild
restituisce l'ultimo figlio del nodo. Se il suo genitore è un elemento, allora il bambino è generalmente un nodo di elemento, un nodo di testo o un nodo di commento. Restituisce null
se non ci sono elementi figli.
Sintassi
var childNode = node.lastChild;
Esempio
var tr = document.getElementById("row1");
var corner_td = tr.lastChild;
Specifiche
Specifica | Stato | Commento |
---|---|---|
DOM The definition of 'Node.lastChild' in that specification. |
Living Standard | Nessun cambiamento |
Document Object Model (DOM) Level 3 Core Specification The definition of 'Node.lastChild' in that specification. |
Obsolete | Nessun cambiamento |
Document Object Model (DOM) Level 2 Core Specification The definition of 'Node.lastChild' in that specification. |
Obsolete | Nessun cambiamento |
Document Object Model (DOM) Level 1 Specification The definition of 'Node.lastChild' in that specification. |
Obsolete | Definizione iniziale |
Compatibilità con i browser
BCD tables only load in the browser