nextSibling property

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
3 out of 3 rated this helpful - Rate this topic

Retrieves a reference to the next child of the parent for the object.

Syntax

JavaScript

p = object.nextSibling

Property values

Type: Object

the next sibling.

Standards information

Remarks

Starting in Microsoft Internet Explorer 6, this property applies to the attribute object.

Examples

This example uses the nextSibling property to obtain the next item in the list.


<SCRIPT>
// returns the list item labeled 'List Item 2'
var oSibling = oList.childNodes(0).nextSibling;
</SCRIPT>
<BODY>
<UL ID = oList>
<LI>List Item 1
<LI>List Item 2
<LI>List Item 3
</UL>
<BODY>

See also

a
abbr
acronym
address
applet
area
attribute
b
base
baseFont
bdo
bgSound
big
blockQuote
body
br
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=hidden
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
object
ol
option
p
plainText
pre
ProcessingInstruction
q
s
samp
script
select
small
span
strike
strong
sub
sup
table
tBody
td
textArea
TextNode
tFoot
th
tHead
title
tr
tt
u
ul
var
xmp
Reference
lastChild
Conceptual
About the W3C Document Object Model

 

 

Send comments about this topic to Microsoft

Build date: 11/27/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

© 2013 Microsoft. All rights reserved.