Hola
f_murciano Código PHP:
<html>
<head>
<script>
function numeros(e,txt) {
tecla = (document.all) ? e.keyCode : e.which;
if ((tecla<48 || tecla>57) && tecla!=46) return false
if (tecla == 46 && txt.indexOf('.')!=-1) return false;
}
</script>
</head>
<body>
<input type="text" onKeyPress="return numeros(event,this.value)">
</body>
</html>
Por cierto, deberías añadir algo para que se pueda usar la tecla de retroceso.
Saludos,