All we know that getElementsByTagName() a DOM function in Javascript is used to get all the child elements for an particular element.Consider this following scenario I have an table with the id as “parentTable”, which has many child tables in it. so my structure will be like this,
			<table id='parentTable'>
						<table id='childTable1'>
								<td>My First Article</td>
If i’m going to use parentTable.getElementByTagName(”tr”), i’ll be getting the count as 2, Which is what i’m not looking for. I wanted to get the count as 1.Guys please give some alternative suggesstion.
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Tags: ,

Leave a Reply

Name and Email Address are required fields. Your email will not be published or shared with third parties.

Get Adobe Flash player