HTML DOM lastChildProperty
Examples
Return the last child node of the document:
document.getElementById("myList").lastChild;
Try it yourself »
Definition and Usage
The lastChild property returns the last child node of the document.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the lastChild property
Syntax
node.lastChild
Technical Details
| Return value: | The last child node |
|---|---|
| DOM Version | Core Level 1 Node Object |
Other Extensions
Element Object