Escolar Documentos
Profissional Documentos
Cultura Documentos
<script>
function formatar(mascara, documento){
var i = documento.value.length;
var saida = mascara.substring(0,1);
var texto = mascara.substring(i)
if (texto.substring(0,1) != saida){
documento.value += texto.substring(0,1);
}
}
</script>
=================================
Inputs do formulário
=================================
CAMPO DATA
<input type="text" name="data" maxlength="10" OnKeyPress="formatar('##/##/####',
this)" >
CAMPO TELEFONE
<input type="text" name="tel" maxlength="12" OnKeyPress="formatar('##-####-####',
this)" >
CAMPO CEP
<input type="text" name="cep" maxlength="9" OnKeyPress="formatar('#####-###',
this)" >
CAMPO CPF
<input type="text" name="cpf" maxlength="14" OnKeyPress="formatar('###.###.###-##',
this)" >
CAMPO HORA
<input type="text" name="hora" maxlength="5" OnKeyPress="formatar('##:##', this)" >
=================================
Dicas
=================================
Crie campos de acordo com a sua necessidade, e personalize o padrão deseja, como
por exemplo
Data de nascimento, RG, Celular entre outros.