Saiba todas as features que te ajudarão a produzir sistemas mais rapidamente.
Máscaras para campos diversos
Para as máscaras utilizamos o plugin jQuery-Mask-Plugin com alguns atalhos definidos.
classe | mascara |
---|---|
.ls-mask-date | 11/11/1111 |
.ls-mask-time | 00:00:00 |
.ls-mask-date_time | 00/00/0000 00:00:00 |
.ls-mask-cep | 00000-000 |
.ls-mask-phone8 | 0000-0000 |
.ls-mask-phone9 | 90000-0000 |
.ls-mask-phone8_with_ddd | (00) 0000-0000 |
.ls-mask-phone9_with_ddd | (00) 90000-0000 |
.ls-mask-cpf | 000.000.000-00 |
.ls-mask-cnpj | 00.000.000/0000-00 |
.ls-mask-money | #.##0,00 |
.ls-mask-number | #.##0 |
.ls-mask-ip_address | 0ZZ.0ZZ.0ZZ.0ZZ |
.ls-mask-percent | ##0,00% |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<form action="" class="ls-form ls-form-horizontal" data-ls-module="form">
<label class="ls-label col-md-3">
<b class="ls-label-text">Telefone</b>
<input type="text" name="cel2" class="ls-mask-phone8_with_ddd" placeholder="(99) 9999-9999" >
</label>
<label class="ls-label col-md-3">
<b class="ls-label-text">CNPJ</b>
<input type="text" name="cnpj" class="ls-mask-cnpj" placeholder="00.000.000/0000-00" >
</label>
<label class="ls-label col-md-3">
<b class="ls-label-text">CPF</b>
<input type="text" name="cpf" class="ls-mask-cpf" placeholder="000.000.000-00" >
</label>
<label class="ls-label col-md-2">
<b class="ls-label-text">CEP</b>
<input type="text" name="cep" class="ls-mask-cep" placeholder="00000-000" >
</label>
</form>