Erro em máscara
Estou tentando usar máscara em três campos do meu formulário: cpf, telefone e data de nascimento. Mas está me dando o seguinte erro, que não estou conseguindo resolver:
Uncaught TypeError: Object [object Object] has no method 'mask'
O código:
Javascript:
<head>
<script src="[url=[http://code.jquery.com/jquery-1.10.1.min.js](http://code.jquery.com/jquery-1.10.1.min.js)][http://code.jquery.com/jquery-1.10.1.min.js](http://code.jquery.com/jquery-1.10.1.min.js) [/url]"></script>
<script type="text/javascript" src="Cliente/visao/jquery.maskedinput.js"></script>
<script type="text/javascript" src="Cliente/visao/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("input.cpf").mask("999.999.999-99");
$("input.tel").mask("(99) 9999-9999");
$("input.data").mask("99/99/9999");
});
</script>
</head>
Formulário:
<form id="form_cad_cliente" action="?pag=Cliente/controle/verificaAcao.php" method="post">
<div id="form">
<input class="field" type="hidden" name="controlador" value="ControleCliente"/>
<input class="field" type="hidden" name="acao" value="inserir"/>
<label>Nome: </label> <input class="field" type="text" name="nome" /> <br /> <br />
<label>Cpf: </label><input type="text" class="cpf" id="cpf" name="cpf" /> <br /><br />
<label>Sexo:</label>
<select name="sexo" id="sexo">
<option value="">Selecione o sexo</option>
<option value="f">Feminino</option>
<option value="m">Masculino</option>
</select>
<br /><br />
<label>Endereço: </label><input class="field" type="text" name="endereco" /><br /><br><br />
<label> Cidade: </label> <input class="field" type="text" name="cidade" /> </br><br />
<label>Estado: </label><input class="field" type="text" name="estado" /> <br /><br />
<label>Telefone: </label><input type="text" class="tel" id="tel" name="tel"/> <br /><br />
<br />
<label>Data de nascimento: </label><input type="text" class="data" id="data" name="data"/>
<div id="botoes"><input type="submit" value="Enviar"/>
<input type="button" value="Voltar" OnClick="location.href='?pag=Cliente/index.php';">
</div>
<!--<input type="button" value="Ver listagem" onclick="location.href='/mvcpiloto2/controller/controllercliente.php?a=listar'"/>-->
</div>
</form> Alguém pode me ajudar?Discussão (1)
Carregando comentários...