Gets a reference to the last child in the childNodes collection of an object.
Syntaxvar result = element.lastChild;
element.lastChild = value;
Examples
The following code example implements the lastChild property to obtain a reference to the last child element of an object.
<body>
<ul id = "oList">
<li>List Item 1</li>
<li>List Item 2</li>
<li>List Item 3</li>
</ul>
<script type="text/javascript">
var olastChild = oList.lastChild;
</script>
<body>
Usage
Used to remove and append nodes to user lists and tables.
Syntax
var last_child = element.lastChild
Standards informationMozilla Developer Network : [Node.lastChild Article]
Microsoft Developer Network: [lastChild Property Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4