I am looking for a way to change some font style from let's say bold to normal on some text links.
The problem is that I have more than one and they all start with some 2 letter text (example bellow)
I have a js function that onclick will turn the text to bold, 12px, red
but i need to clear the style for all other spans that starts with yr...
any suggestions?
The problem is that I have more than one and they all start with some 2 letter text (example bellow)
Code:
<span id='yr123'>text</span>
<span id='yr1234'>text</span>
<span id='yr46545'>text</span>
<span id='yr897822'>text</span>
but i need to clear the style for all other spans that starts with yr...
Code:
function change_font(what){
document.getElementById(what).style.fontSize = "12";
document.getElementById(what).style.fontWeight = "bold";
document.getElementById(what).style.color = "#990000";
}
any suggestions?