Sign In
|
Register
Please Log In to save to favorites
TAGs
get all elements with a particular tag in javascript
Versions
Versions
30/12/2009 22:15:28
Get elements of a particular tag with javascript
by
duniyadnd
Get all the tags in the document.
1.
var
el = document
.getElementsByTagName
("strike");
2.
3.
for
(
var
i = 0 ; i < el
.length
; i++ ) {
4.
alert(el[i]
.innerHTML
);
5.
}
Comments
Sign in to give your comments.