30.04.2004, 20:15
So ich habs etwas Kürzer als deine funzt aber im großen und ganzen genau so ![Big Grin Big Grin](https://net-board.net/images/smilies/biggrin.png)
diese Datei binden wir nun in unsere HTML ein hmm daraus werde ich ein Tutorial machen hehe...
so probiert es mal aus dürfte alles gehen
![Big Grin Big Grin](https://net-board.net/images/smilies/biggrin.png)
Code:
Dateiname: onclick.js
function alterCate(elm, onoff) { if (typeof(onoff) == "undefined" ) { onoff = "blur"; } if (!elm.base) { elm.base = elm.value; } if (elm.value == elm.base && onoff != "blur") { elm.value = ""; } else if (elm.value == "" && onoff == "blur") { elm.value = elm.base; } }
diese Datei binden wir nun in unsere HTML ein hmm daraus werde ich ein Tutorial machen hehe...
Code:
<SCRIPT src="onclick.js" type=text/javascript></SCRIPT>
<input class="searchform" onblur="alterCate(this, 'blur')" onfocus="alterCate(this, 'focus')" value="Dein Text" name="form_suchbegriff" base="Suchbegriff...">
so probiert es mal aus dürfte alles gehen