PDA

View Full Version : Help with script



beg.webmaster
02-01-2007, 04:18 AM
i need a way onClick to change the font color on a page useing a link. Is this possible? For an example i used this
<a href="#" onClick="document.bgColor='navy'";>Navy</a>
code to change the BG color, so can you use something like this
<a href="#" onClick="document.font color='navy'";>Navy</a>
to change the font color?

jscheuer1
02-01-2007, 04:33 AM
<a href="#" onclick="document.body.style.color='navy';return false;">Navy</a>

But, this is better:


<span style="cursor:pointer;" onclick="document.body.style.color='navy';">Navy</span>

beg.webmaster
02-01-2007, 04:40 AM
Thank you very much. :)