lastChild property

This topic has not yet been rated - Rate this topic

Gets a reference to the last child in the childNodes collection of an object.

Syntax

JavaScript

p = object.lastChild

Property values

Type: Object

the last child.

Standards information

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>List Item 2
<LI>List Item 3
</UL>
<SCRIPT>
var olastChild = oList.lastChild;
</SCRIPT>
<BODY>


See also

a
abbr
address
area
attribute
b
base
bdo
blockQuote
body
button
caption
cite
code
col
colGroup
comment
dd
del
div
dl
documentType
dt
em
embed
fieldSet
form
head
hn
hr
html
i
iframe
img
input type=button
input type=checkbox
input type=file
input type=image
input type=password
input type=radio
input type=reset
input type=submit
input type=text
ins
kbd
label
legend
li
link
map
ol
option
p
pre
ProcessingInstruction
q
s
samp
script
select
small
span
strong
sub
sup
table
tBody
td
textArea
tFoot
th
tHead
title
tr
u
ul
var
Reference
firstChild
Conceptual
About the W3C Document Object Model

 

 

Build date: 11/28/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.