Thomas G.: Ein Hovereffekt oder Rollovereffekt bei Formularbuttons

Beitrag lesen

Habe es so am <button> dran:

<form>
  <div style="width: 338; height: 29" >
<button onmouseover="if(this.style){this.style.color='#FF0';this.style.backgroundColor='#00C'}" onmouseout="if(this.style){this.style.color='#FFF';this.style.backgroundColor='#F00'}" STYLE="align: left; width: 280; color: #FF0000; background: #FFFFFF;border=0" type="button" onClick="load_word '1','R:\OFFICE\VORLAGEN\RT_Zugriff.dot'">
          <p>
           Antrag DV-Zugriffsberechtigung</button>
  </div>
</form>

Ist aber irgendwie falsch :-(

Seh ich auch so:
-> ";" am Ende der Anweisung
-> das if(this.style) kann weg, es gibt keinen Browser, der hier onmouseover="" auswertet, das aber nicht kennt.

Das ";" zu löschen bringt bei mir nichts :-( Habe es jetzt so:

<div style="width: 338; height: 29" >
 <input type="button" name="Test" value="Daten" onmouseover="{this.style.color='#FF0';this.style.backgroundColor='#00C'}" onmouseout="{this.style.color='#FFF';this.style.backgroundColor='#F00'}" onClick="load_word '1','R:\OFFICE\VORLAGEN\RT_Zugriff.dot'">
          <p>
        </button>

Oder welches ";" meinst du? Habe schon versucht einfach den Tag zu nehmen:

<input type="button" style="color: #FFF; background-color: #F00" value="Lach mich aus" onmouseover="if(this.style){this.style.color='#FF0';this.style.backgroundColor='#00C'}" onmouseout="if(this.style){this.style.color='#FFF';this.style.backgroundColor='#F00'}">

und einfach mein "onClick" hinzugefügt. Meckert aber :-(

gruss Kai

CU Thomas