Posts: 381
Name: El Phantasmo
Location: England, north west
|
Im using the following script to access a list in my web page:
Code:
var nav = document.getElementById ('nav');
alert (nav.childNodes[0].nodeValue);
Currently the alert is completely blank, but I was hoping to be able to get information on each <li> so that I can then edit them (e.g. css properties).
I was thinking the script I currently have would output what is contained in the <li>, which is
Quote:
|
<a href="contact.php">contact</a>
|
Does anyone know what Im doing wrong?
Thanks.
|