1) are you travelling between pages when you click on a link? eg. does the link take you to a different page?
in this case you do not even need javascript at all... you just need to add a class that would provide a distinction between the link from the page in use and the rest of the possible choices
Code:
<a href="somelink">SOME LINK</a>
<a href="thelink" class="selectedLnk">CURRENT LINK</a>
<a href="somelink">SOME LINK</a>
<a href="somelink">SOME LINK</a>
<a href="somelink">SOME LINK</a>
and just change the class on whatever link is the page currently being viewed
2) if you're using the anchor tag to redirect you to a differnt part of the page (eg [jump to Top of page] ) on here is an example then you could try something like
Code:
<a href="#some_reference" onclick="this.style='background-color: #f90'">
the above could also be used in what I am assuming is your situation were you are incorporating some type of frame system :? where you click on a link and it populates the new page into a frame / iframe located somewhere on the page.
Bookmarks