Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
changing link text onClick
Name: jb60606 Date: September 8, 2007 at 13:03:05 Pacific OS: Windows XP CPU/Ram: 2.8Ghz/512MB Product: Homeade
Comment:
Hey,
I currently have a text link that, when clicked, alters the text within the link using the following code:
a href="#" onclick="this.innerHTML='Text has been changed';">Click to change text.a
My question is; how do I get the link to change back to the original text upon a second click? I have a feeling this will need a bit more code, and I'm just not entirely familiar with javascript. Can anyone point me in the right direction?
Summary: James- That's what I was talking about when I said "limited tricks". You can change the background color onmouseover using CSS, but it's not a true image rollover. Not to say that it's not a nice eff...
Summary: Thanks, it works. My html 'a' css class has a hover version that changes the color of the 'Link' string. Can I simply do a <span class="a" onClick="...etc? How can I make the cursor change from an ...
Summary: hello, can i change the color of text when i put the mouse over that text ? and if this text is not a link.. (with links i found how to do it) ...