Preciso de apenas permitir introduzir num campo de texto, numeros e a letra (z), para já criei assim mas nao esta a funionar a parte do (z).
Código (Javascript):
Alguem me pode ajudar ?
Código (Javascript):
<script language='Javascript'>
function SomenteNumero(e)
{
var tecla=(window.event)?event.keyCode:e.which;
if((tecla>47 && tecla<58 )) return true;
else{
if (tecla==90 == tecla==90) return true;
else return false;
}
}
</script><html><head><title> Somente Números </title>
</head><body>
<input type='text' size='10' value='' onkeypress='return SomenteNumero(event)'>
</body></html>
function SomenteNumero(e)
{
var tecla=(window.event)?event.keyCode:e.which;
if((tecla>47 && tecla<58 )) return true;
else{
if (tecla==90 == tecla==90) return true;
else return false;
}
}
</script><html><head><title> Somente Números </title>
</head><body>
<input type='text' size='10' value='' onkeypress='return SomenteNumero(event)'>
</body></html>
Alguem me pode ajudar ?