HTML DOM Node lastChild property
Examples
Returns the last child node of the document:
document.getElementById("myList").lastChild;
try it"
Definition and Usage
lastChild property returns the last child node of the document.
Browser Support
All major browsers support lastChild property
grammar
node .lastChild
technical details
return value: | Last child |
---|---|
DOM version | Core Level 1 Node Object |