getElementsByTagName

Some text outside of any element

Some text outside of any element

Some more text outside of any element

Some OuterDiv text

Some additional OuterDiv text

Some more OuterDiv text

Some InnerDiv text

Some additional InnerDiv text

Some additional OuterDiv text

Some more OuterDiv text

Some text outside of any element

Some more text outside of any element




getElementsByTagName

View Source...

This script uses getElementsByTagName. This shows that getElementsByTagName does not care where the elements are you are tring to get. Look carefully at the structure of the DIVs and those that are designated as element DIVs and those that are not. Click on the button to get a number of paragraph tags in the document. Then evaluate the source code yourself.



Bookmark and Share
Registered® Trademark™ and Copyright© 1973 - CSG, Computer Support Group, Inc. and CSGNetwork.Com All Rights Reserved

Home | Advertising | Calculators | Search | Contact Us | Snippets | Sitemap | Glossary | Top Apps