onChange lo becchi male... usa onKeyUp
<script>
function isnumber(campo){
if (isNaN(campo.value))
alert("Il campo deve essere un numero");
campo.focus();
}
</script>
<form name="form1">
<input onKeyUp="isnumber(this)" name="nome" type="text" size="40">
</form>
provalo
per lo script esterno:
<script src="script.js" type="text/javascript"></script>

Rispondi quotando