getElementsByTagName And getElementByTagName

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 And getElementByTagName

View Source...

This script uses both getElementsByTagName and getElementByTagName. It is a demonstration of the differences. Look carefully at the structure of the DIVs and those that are designated as element DIVs and those that are not. Click on each button to get a correlation of the number of paragraph tags and where they are in relation to the element DIVs. 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