Notices
The Basement Non-Honda/Acura discussion. Content should be tasteful and "primetime" safe.

Javascript help asap!

Thread Tools
 
Old Sep 28, 2006 | 10:29 AM
  #1  
tony's Avatar
tony
Thread Starter
XBL: HotMilkGT // HAN H14
 
Joined: Sep 2002
Posts: 9,587
Likes: 0
Default Javascript help asap!

does anyone know javascript? whats the code for setting text color???
Thanks
Reply
Old Sep 28, 2006 | 10:34 AM
  #2  
mayonaise's Avatar
mayonaise
Senior Member
 
Joined: Aug 2002
Posts: 3,181
Likes: 0
From: CA
Default

how is your code setup? the text you want to change has to be contained within some element, like a <div> or <span> or anything else, and it has to have an id, like <div id="blah">... then, in javascript:

document.getElementById('blah').style.color = "#FF0000";

will set the color to red
Reply




All times are GMT -8. The time now is 03:21 AM.