HTML DOM lastChildProperty

元素对象参考手册Element Object

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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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


元素对象参考手册Element Object

Other Extensions