Getting a Handle on the DOM
Practice Selecting Elements
nav.getElementsByTagName('a') doesn't work. Don't know why, MDN uses table.getElementsByTagName('td'); as an example.
"nav.getElementsByTagName('a') doesn't work."
When you select nav.getElementsByTagName('a')
have you made sure that nav is saved to a variable?
Like this: var nav = document.getElementsByTagName('nav'); ?
Otherwise it doesnt know what you are selecting if nav isnt saved to a variable.
Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.
I forgot my password