I'm trying to change the font style of a link when that link is clicked.
But the link (sometimes) includes a named anchor. So I need to test for a
given named anchor and apply style changes if the test is true - since there
will be several different named anchors in the page. I don't think this is
very advanced, but I'm new to JavaScript .
I code the link like this:
<p><span id="currentlink "><a href="techpage. php#tech02"
onClick="anchor name('#tech02') </a></span></p>
Which calls this function:
function anchorname(n) {
var a=(window.locat ion.hash);
if n=a {
changeproperty span(currentlin k).color=#CC000 0;}
}
That function is pretty much pseudo code. What it needs to do is change the
properties of the css id - which I assume would be declared in a span around
the link. Is the link code correct? The function? Both wrong?
Any help is appreciated...