Link to home
Start Free TrialLog in
Avatar of centem
centemFlag for United States of America

asked on

Javascript getElementByTagName error

Hello,
I'm learning javascript and I'm experimenting running javascript in the firebug console. I'm executing the following code:
var myListItems = document.getElementByTagName("a");

console.log(myListItems);

But, I'm getting the following error:
TypeError: document.getElementByTagName is not a function

Should it not display an array with all the anchor tags. If not how do I do that.

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Ron Malmstead
Ron Malmstead
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial