What I have to do is not permit to introduce number characters in a text input in a form, but I've to do it with javascript. Here's my HTML code:
<form id="formu">
<input type="text" id="num" />
</form>
And here's my JS code:
function numero(theEvent){
var evento=theEvent||window.event;
switch(evento.type){
case 'keypress':
if(document.getElementById("num").evento.keyCode>=48&&document.getElementById("num").evento.keyCode<=57){
return false;
}
}
}