Skip to content

Instantly share code, notes, and snippets.

@Vampre Vampre/mascaraCEP.js
Created Oct 18, 2012

Embed
What would you like to do?
Função mascara CEP colocar em <input type="text" onkeypress='mascaraCEP(this,"id_prox_campo");'>
function mascaraCEP(obj,prox) {
switch (obj.value.length) {
case 6:
obj.value = obj.value + "-";
break;
case 9:
document.getElementById(prox).focus();
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.