getElementByID
CSGNetwork FREE Source Code, Javascript Source, and Code Snippets!
CSGNetwork Custom Search
     Bookmark and Share
 
CSGNetwork
Snippets
Calculators
Top Free Apps
Home
Back



Right click this window and select "view source" in order to copy the source for this script.

This is an alternative to getElementByID..

The dollar function is a simple way to grab an element quickly. It not only takes in strings, it takes objects too.

Instead of: document.getElementById('a');
use: $('a');

If you want a whole collection of elements, you can simply do this: $('a','b',obj,obj2,'c','d');

Also see conventional code for getElementByID within.


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