Thread: Javascript loop
View Single Post

  #7 (permalink)  
Old 01-02-2008, 08:30 PM
davkell davkell is offline
Coder
 
Join Date: Jul 2007
Location: Galway
Posts: 66
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
davkell has much to be proud ofdavkell has much to be proud ofdavkell has much to be proud ofdavkell has much to be proud ofdavkell has much to be proud ofdavkell has much to be proud ofdavkell has much to be proud ofdavkell has much to be proud of
Default

Quote:
Originally Posted by louie View Post
I cann't get my head around it.
all I have is the beginning of the string in this case "yr".
How am i supposed to reference to that particular span?
I tried:
Code:
document.getElementsByTagName("span").style.fontWeight = "normal";
and nothing
Also, that code (getElementsByTagName) returns an array, so you'll need to loop through the array to change the individual elements, rather than than trying to set the style of the array (as you're doing above).
Reply With Quote