Automatic character insertion in a form to validate CPF [duplicate]

0

Friends, I'm doing a CRUD system and now I'm working on the consistencies, and the part that the user types the CPF, I want after entering 3 numbers, a point is inserted automatically, can someone help? Thank you in advance

    
asked by anonymous 22.06.2017 / 20:20

1 answer

0

Download this lib ( link ) and use it as follows:

<script type="text/javascript" src="js/jquery.maskedinput-1.1.4.pack.js"/></script>

<input type="text" name="cpf" id="cpf" />

<script type="text/javascript">
    jQuery(document).ready(function($){ 
        $("#cpf").mask("999.999.999-99");
    });
</script>
    
22.06.2017 / 20:25