forked from jackocnr/intl-tel-input
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
46 lines (44 loc) · 1.5 KB
/
demo.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>International Telephone Input</title>
<link rel="stylesheet" href="build/css/intlTelInput.css" />
<link rel="stylesheet" href="build/css/demo.css" />
</head>
<body>
<h1>International Telephone Input</h1>
<form>
<input id="phone" name="phone" type="tel" />
<button type="submit">Submit</button>
</form>
<script src="build/js/intlTelInput.js"></script>
<script>
var input = document.querySelector("#phone");
window.intlTelInput(input, {
// allowDropdown: false,
// autoInsertDialCode: true,
// autoPlaceholder: "off",
// dropdownContainer: document.body,
// excludeCountries: ["us"],
// formatOnDisplay: false,
// geoIpLookup: function(callback) {
// fetch("https://ipapi.co/json")
// .then(function(res) { return res.json(); })
// .then(function(data) { callback(data.country_code); })
// .catch(function() { callback("us"); });
// },
// hiddenInput: "full_number",
// initialCountry: "auto",
// localizedCountries: { 'de': 'Deutschland' },
// nationalMode: false,
// onlyCountries: ['us', 'gb', 'ch', 'ca', 'do'],
// placeholderNumberType: "MOBILE",
// preferredCountries: ['cn', 'jp'],
// separateDialCode: true,
// showFlags: false,
utilsScript: "build/js/utils.js"
});
</script>
</body>
</html>