-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
49 lines (36 loc) · 961 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="datepicker.css"/>
</head>
<body>
<input type="text" class="number" />
<span>Only number</span>
<br/>
<input type="text" class="phone" />
<span>Phone</span>
<br/>
<input type="text" class="amount" />
<span>amount</span>
<br/>
<input type="text" class="card" />
<span>custom formatter for card number</span>
<br/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="formatter.js"></script>
<script type="text/javascript">
$(function() {
$('.number').formatter('number');
$('.phone').formatter('phone');
$('.amount').formatter('amount');
$('.card').formatter('number', {
mask : '9999 9999 9999 9999',
placeholder : '_',
completed : null,
definitions : { '9': '[0-9]'}
});
});
</script>
</body>
</html>