Hey, First of all sorry - this is probably a dumb question but I'm a complete newbie when it comes to javascript! I have a site where I'll have multiple links on a page. I want the anchor text to change when they are clicked. For example: Link 1 Anchor Text Link 2 Anchor Text Link 3 Anchor Text Code (markup): I want the text to change to: Done Link 2 Anchor Text Done Code (markup): Once links 1 and 3 have been clicked. Also is it possible to change the color of the links to black once they've been clicked? Thanks! Hodge
Another method is with CSS. Example, insert this in the "head" of your html: <style type="text/css"> a:visited { text-decoration: none; color: red; } </style> Code (markup):
So do I put it into the tags like this? Btw in case I didn't say it before I want the links to open new windows when they get clicked. <a href = "http://www.google.com" target = "_blank" OnClick="this.text='Done';this.fgcolor='black'">Google</a> Code (markup): Thanks for your help but I had thought of that approach. The main thing at this stage is to get the anchor text to change to done permanently (for that page load) to "Done". Thanks, Hodge
I will suggest have a look at this resource site for CSS navigation menus with special effects even without using javascript: http://css.maxdesign.com.au/listamatic
Wait... I thought you can't change text dynamically like what I'm looking for with CSS. I know you can change the color of a link once it's been clicked with CSS but not change anchor text right?