Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/05/2006, 06:20
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 3 meses
Puntos: 772
Hola Yanka_17

Creo que esto te servirá:
Código:
<html>
<head>
<script type="text/javascript">
function pulsar(e) {
    tecla = (document.all) ? e.keyCode : e.which;
    if (tecla==8) return true;
    patron =/\s/;
    te = String.fromCharCode(tecla);
    return !patron.test(te);
}
</script>
</head>
<body>
<input type="text" onkeypress = "return pulsar(event)" />
</body>
</html>
Saludos,

Última edición por JavierB; 23/05/2006 a las 08:40