![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, With the following piece of code I can change the font-weight CSS property of the hyperlink to a bold typeface: a href="index.html" onClick="style.fontWeight='bold'>" I use this piece of HTML to make a hyperlink bold when clicking on it. Problem is, when I click another link on the same page, the previous link stays bold. And that's not what it is supposed to do - it should get a normal font-weight again. How can I do this, using only Javascript? I tried following JavaScript, but it didn't worked: onClick='document.getElementByTag("a").fontWeight= "normal" How come? And does anyone know the answer? Thanks in advance, Alain |
![]() |
| Thread Tools | |
| Display Modes | |
| |