Christian Weihermüller: Farbe von Formularfelder

Beitrag lesen

<script type="text/javascript">
<!--
function putin(w){
absatz=document.eingabe.ta.value=w; document.eingabe.ta.focus();

document.eingabe.ta.style.backgroundColor = "red";

}
</script>
</head>
<body>
<form action="aufstellung.php" method="post" name="eingabe">
<input type="text" name="ta" readonly onfocus='this.style.backgroundColor = "yellow";' class="field"><input type="button" value="Einsetzen" onclick='javascript:put("test");' class="field">
</body>

so ich hab des unwichtig rausgenommen..
vielelicht bringts ja was ;)

also kurze erklärung: wenn auf das feld geklickt wird, soll es eine andere farbe bekommen. wenn dann auf den button gedrückt wird, soll es die ausgangsfarbe bekommen

hoffe es is so verständlich ;)

cu
christian