Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/05/2006, 13:18
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años
Puntos: 772
Hola Fitoyes

Con este código no se puedes escribir acentos:
Código PHP:
<html>
<
head>
</
head>
<
body>
<
html>
<
head>
<
script type="text/javascript">
function 
validar(e) {
    
tecla = (document.all) ? e.keyCode e.which;
    if (
tecla==8) return true;
    
patron =/[&#225;éíóúÁÉÍÓÚ]/;
    
te String.fromCharCode(tecla);
    return !
patron.test(te); 

</script>
</head>

<body>
<textarea onkeypress = "return validar(event)"></textarea>
</body>
</html>  
</body>
</html> 
Saludos,