Hvorfor virker denne ikke??
min form hedder f - mit inputfelt hedder Antal.<SCRIPT LANGUAGE=\"JavaScript1.2\">
<!--
ns4 = (document.layers)? true:false;
ie4 = (document.all)? true:false;
function kp(e) {
if (ns4) {if (e.which==13 || e.which==9) { /*ok*/ }
else if (e.which<48 || e.which>57) {alert(\'Skriv KUN tal\');}
}
if (ie4) {e=window.event; if (e.keyCode==13 || e.keyCode==9) { /*ok*/ }
else if (e.keyCode<48 || e.keyCode>57) {alert(\'Skriv KUN tal\');
e.cancelBubble=true;e.keyCode=0;}
}
}
function init() {
document.f.Antal.onkeypress=kp;
}
//-->
</script>