Top.Mail.Ru
? ?
Javascript's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Thursday, September 6th, 2007

Time Event
1:32a
Javascript to change nested styles
I have a LI with an ID of subnav1. Within that object I have a link object, a.

I know I can change the color of text in LI with
document.getElementById('snav1').style.color="#5378af";

But is there a way - without assigning an id to the link object a - to change all the link colors within the object subnav1?

In CSS we would use #subnav1 a { color: #5378af; }

I am trying to do the same thing with Javascript.

SOLVED

<< Previous Day 2007/09/06
[Calendar]
Next Day >>
About LiveJournal.com
Image