Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
tenho uma mascara, ta funcionando certinho, porem qdo o usuario faz CTRL+V ele aceita os caracteres que eu bloquiei, como eu faço pra impedir isso?tem como eu bloquear a techa CTRL ou a funcao?seria melhor bloquear a funcao no meu caso....faloe e at+
> <html><head><title></title></head><body><form name="form"><table width="238" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="77">Letra</td> <td width="161"><input name='Letra' type='text' class='textbox' onKeypress="return MascaraLetra(event);" size='10' maxlength="10"></td> </tr> <tr> <td>Numero</td> <td><input name='Num' type='text' class='textbox' onKeypress="return MascaraNum(event);" size='10' maxlength="10"></td> </tr> <tr> <td>LetraNum</td> <td><input name='NumLetra' type='text' class='textbox' onKeypress="return MascaraNumLetra(event);" size='10' maxlength="10"></td> </tr> <tr> <td>Key</td> <td><input name="key" type="text" id="key" size="1" maxlength="1" onKeypress="return QualKey(event);"></td> </tr></table></form></body></html><script language="JavaScript">function QualKey(e) {if(window.event) { // for IE, e.keyCode or window.event.keyCode can be used key = e.keyCode; alert(key);}}function MascaraLetra(e) {if(window.event) { // for IE, e.keyCode or window.event.keyCode can be used key = e.keyCode;// alert(key);}else if(e.which) { // netscape key = e.which;}if (key!=8 || key!=32 || key!=44 || key < 64 || key > 91 || key < 97 || key > 122) return (( (key > 64) && (key < 91)) || ((key > 96) && (key < 123)) || (key==8) || (key==32) || (key==44));{ return true; }}function MascaraNum(e) {if(window.event) { // for IE, e.keyCode or window.event.keyCode can be used key = e.keyCode;// alert(key);}else if(e.which) { // netscape key = e.which;}if (key < 48 || key > 57) return (( (key > 48) && (key < 57) ));{ return true; }}function MascaraNumLetra(e) {if(window.event) { // for IE, e.keyCode or window.event.keyCode can be used key = e.keyCode;// alert(key);}else if(e.which) { // netscape key = e.which;}if (key!=8 || key!=32 || key < 48 || key > 57 || key!=44 || key < 64 || key > 91 || key < 97 || key > 122) return (( (key > 48) && (key < 57) ) || ( (key > 64) && (key < 91)) || ((key > 96) && (key < 123)) || (key==8) || (key==32) || (key==44));{ return true; }}</script>Carregando comentários...