Código Javascript:
Ver original
function letras(e) { tecla = (document.all) ? e.keyCode : e.which; if (tecla==8) return true; patron =/[A-Za-zñÑ\s]/; te = String.fromCharCode(tecla); return patron.test(te); } function numero(e) { tecla = (document.all) ? e.keyCode : e.which; if (tecla==8) return true; patron =/[\d]/; te = String.fromCharCode(tecla); return patron.test(te); } function num_let(e) { tecla = (document.all) ? e.keyCode : e.which; if (tecla==8) return true; patron =/[\dA-Za-zñÑ\s]/; te = String.fromCharCode(tecla); return patron.test(te); }