valor = document.tuFormu.tuControl.value; if (parseInt(valor) != parseFloat(valor)) alert ('Sólo enteros, porfa');