-
Notifications
You must be signed in to change notification settings - Fork 81
/
index.html
43 lines (37 loc) · 1.2 KB
/
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Payform Demo</title>
</head>
<body>
<div>
<label for="ccnum">Number</label>
<input type="text" name="ccnum" id="ccnum" inputmode="numeric" autocomplete="cc-number">
</div>
<!--
TODO: use one input autocomplete=cc-exp input (e.g. 2015-12)
or two separate inputs, cc-exp-year & cc-exp-month
https://html.spec.whatwg.org/multipage/forms.html#attr-fe-autocomplete-cc-exp
-->
<div>
<label for="expiry">Expiry</label>
<input type="text" name="expiry" id="expiry" inputmode="numeric">
</div>
<div>
<label for="cvc">CVC</label>
<input type="text" name="cvc" id="cvc" inputmode="numeric" autocomplete="cc-csc">
</div>
<div>
<label for="numeric">Numeric</label>
<input type="text" name="numeric" id="numeric" inputmode="numeric" autocomplete="cc-number">
</div>
<script src="dist/payform.js" charset="utf-8"></script>
<script>
payform.cardNumberInput(document.getElementById('ccnum'));
payform.expiryInput(document.getElementById('expiry'));
payform.cvcInput(document.getElementById('cvc'));
payform.numericInput(document.getElementById('numeric'));
</script>
</body>
</html>