hi,
Ich schreibe in mein Formular ein Wort und lösche die Buchstaben wieder mit Backspace. Dabei bleibt der letzte Buchstabe immerstehn, obwohl ich alle im <input> gelöscht habe.
Du rufst die Funktion mit onkeyup auf.
Du hast Backspace/[del] gedrückt, der Feldinhalt _ist_ jetzt leer - onkeyup "feuert" erst jetzt.
function print(input)
{
var val = input.value;
if(!val) return;
!val trifft zu, weil val leer - Funktion wird mit return verlassen.
gruß,
wahsaga
--
/voodoo.css:
#GeorgeWBush { position:absolute; bottom:-6ft; }
/voodoo.css:
#GeorgeWBush { position:absolute; bottom:-6ft; }