jQuery mask plugin for CPF

5

I wonder what I'm doing wrong. I'm using this plugin plugin to try to apply a CPF mask (need to be through the CDN) but when I enter the data in the field, nothing happens. Here is my head where I import the CDNS:

!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.12/jquery.mask.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.12/jquery.mask.min.js"></script>

javascript function:

<script>
//Mascara CPF
$(document).ready(function(){
  $('#paramCpf').mask('999.999.999-99');
});
</script>

My CPF field:

<TR>
    <TD> <b>CPF</b> </TD>
    <TD> <INPUT type="text" name="paramCpf" id="paramCpf" value=""> </TD>
</TR>
    
asked by anonymous 01.11.2017 / 20:01

1 answer

2

Two things, see if you import JQUERY too, these 2 libs that are important for mask only, all jquery plugins ask to import Jquery as well. Second thing, from an F12 (if it's chrome) and go to "Network" and see if it really has status 200 the items that you imported. Here's the jquery cdn for you to test

<script
  src="https://code.jquery.com/jquery-3.2.1.min.js"integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
  crossorigin="anonymous"></script>
    
01.11.2017 / 20:05