vediamo
html
jsCodice PHP:<form name="form">
<input type="text" name="testo">
<form>
non l'ho testato..Codice PHP:function checkFields() {
if (testo && !isNaN(Number(testo)) && typeof testo != 'boolean') {
return;
} else {
alert('Devi inserire un numero, fagiano!!');
}
}
function init() {
var testo = document.form.testo;
testo.onblur = checkFields(testo);
}
window.onload = init;
![]()

Rispondi quotando