event handler, as for its original use, you should use the
onclick event handler.
While not wrong in itself, this little function can cause
lots of problems and wreak total havoc in the hands of the
inexperienced. This is a function you really need to know
what you are doing to use correctly. Usually, you would
want to use
OK, so this one is not entirely bad (just a bit), but it is being horribly overused.
document.getElementById() is not a very efficient
method, and in many cases there are more efficient ways of
getting an object reference, usually the various collections
available on a page.