lastChild property
[This documentation is preliminary and is subject to change.]
Gets a reference to the last child in the childNodes collection of an object.
Syntax
| JavaScript | |
|---|
Property values
Type: Object
the last child.
Standards information
- Document Object Model (DOM) Level 1 Specification, Section 1.2
Remarks
Microsoft Internet Explorer 6 and later. The attribute object supports this property.
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
- Attr Constructor
- a
- abbr
- acronym
- address
- applet
- area
- attribute
- b
- base
- baseFont
- bdo
- big
- blockQuote
- body
- button
- caption
- center
- cite
- code
- col
- colGroup
- comment
- dd
- del
- dfn
- dir
- div
- dl
- documentType
- dt
- em
- embed
- fieldSet
- font
- form
- frame
- frameSet
- 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
- listing
- map
- marquee
- menu
- nextID
- ol
- option
- p
- plainText
- pre
- ProcessingInstruction
- q
- s
- samp
- script
- select
- small
- span
- strike
- strong
- sub
- sup
- table
- tBody
- td
- textArea
- tFoot
- th
- tHead
- title
- tr
- tt
- u
- ul
- var
- xmp
- Element Constructor
- HTMLDocument Constructor
- Text Constructor
- Reference
- firstChild
- Conceptual
- About the W3C Document Object Model
Build date: 2/14/2012
Remarks
N.B. #1. If the lastChild is not-specifically-HTML, it may have .data rather than .innerText or .innerHTML.
e.g. <DL><DT>firstChild.innerText</DT>lastChild.data</DL>
N.B. #2. In this property, its .data can be unstably fragmented, (It is probably a clipBoard subprocess).
e.g. mixed-mode entry, e.g. keyboard and script-assisted, can sub-break the .data where no BREAKs exist....
- 1/25/2011
- Mr. Raymond Kenneth Petry
- 2/1/2011
- Mr. Raymond Kenneth Petry