Hallo
was willst du denn nun? onMouseOver/OnMouseOut oder onClick?
belassen wir es wie im Bsp beo de MouseOver, ansonsten kannst dus dir ja schnell abändern...
function wechseln() {
schreibe da die funktion in
function wechseln(obj, on) {
um
if(document.getElementById("stark").className == "normal")
document.getElementById("stark").className = "extra";
else
document.getElementById("stark").className = "normal";
wird dann zu
if(on)
obj.className = "extra";
else
obj.className = "normal";
}
<p><strong id="stark" class="normal" onMouseOver="wechseln()" onMouseOut="wechseln()">ganz stark!</strong></p>
und hieraus mache ein
<p><strong class="normal" onMouseOver="wechseln(this, true)" onMouseOut="wechseln(this, false)">ganz stark!</strong></p>
damit sollte es gehen.
Grüße
David
"Nobody will ever need more than 640k RAM!"
1981 Bill Gates