getElementsByClassName method

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.
0 out of 8 rated this helpful - Rate this topic

Gets a collection of objects that are based on the value of the class attribute.

HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 3.1.1Internet Explorer 9

Syntax

object.getElementsByClassName(v)

Parameters

v [in]

Type: String

A String value that specifies the value of a class attribute.

Return value

Type: Element

Returns a collection of objects with the same class attribute value.

Standards information

Remarks

To search for multiple class attribute values, separate them with spaces in the v parameter.

See also

a
abbr
acronym
address
applet
area
article
aside
audio
b
base
baseFont
bdo
bgSound
big
blockQuote
body
br
button
canvas
caption
center
cite
code
col
colGroup
comment
custom
dd
del
dfn
dir
div
dl
dt
em
embed
fieldSet
figcaption
figure
font
footer
form
frame
frameSet
head
header
hgroup
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
isIndex
kbd
label
legend
li
link
listing
map
mark
marquee
media
menu
meta
nav
nextID
noBR
noFrames
noScript
object
ol
optGroup
option
p
param
plainText
pre
q
rt
ruby
s
samp
script
section
select
small
source
span
strike
strong
style
sub
sup
table
tBody
td
textArea
tFoot
th
tHead
title
tr
tt
u
ul
var
video
wbr
xmp

 

 

Send comments about this topic to Microsoft

Build date: 11/28/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

© 2013 Microsoft. All rights reserved.