
February 9th, 2013, 03:55 PM
|
 |
pollyanna
|
|
Join Date: Jul 2012
Location: Germany
|
|
I understand what you're trying to do. The question is why you want to do it, because you're reinventing the wheel. Every framework on this planet (jQuery, Prototype, YUI, ...) has those element selectors already. So unless you do this purely for learning, it's pretty pointless.
Anyway, selecting all elements of the same type is a native JavaScript method:
getElementsByTagName
|