52 lines
2.6 KiB
HTML
52 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Example: European countries</title>
|
|
<link rel="stylesheet" href="../css/prism.css">
|
|
<link rel="stylesheet" href="../../build/css/intlTelInput-1400377268998.css">
|
|
<link rel="stylesheet" href="../../build/css/demo-1400377268998.css">
|
|
|
|
|
|
<!-- GOOGLE ANALYTICS -->
|
|
<script>
|
|
var _gaq = _gaq || [];
|
|
_gaq.push(['_setAccount', 'UA-26178728-1']);
|
|
_gaq.push(['_trackPageview']);
|
|
(function() {
|
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
})();
|
|
</script>
|
|
<!-- /GOOGLE ANALYTICS -->
|
|
</head>
|
|
|
|
<body>
|
|
<a href="../../../../intl-tel-input.html">Back</a>
|
|
<h1>Example: European countries</h1>
|
|
<p>Set onlyCountries option to just European country codes.</p>
|
|
|
|
<h2>Markup</h2>
|
|
<pre><code class="language-markup"><input id="phone" type="tel" placeholder="e.g. +1 702 123 4567"></code></pre>
|
|
|
|
<h2>Code</h2>
|
|
<pre><code class="language-javascript">$("#phone").intlTelInput({
|
|
onlyCountries: ["al", "ad", "at", "by", "be", "ba", "bg", "hr", "cz", "dk", "ee",
|
|
"fo", "fi", "fr", "de", "gi", "gr", "gg", "va", "hu", "is", "ie", "im", "it", "je",
|
|
"lv", "li", "lt", "lu", "mk", "mt", "md", "mc", "me", "nl", "no", "pl", "pt", "xk",
|
|
"ro", "ru", "sm", "rs", "sk", "si", "es", "sj", "se", "ch", "ua", "gb"]
|
|
});</code></pre>
|
|
|
|
<h2>Result</h2>
|
|
<div id="result">
|
|
<input id="phone" type="tel" placeholder="e.g. +1 702 123 4567">
|
|
</div>
|
|
|
|
<script src="../js/prism.js"></script>
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
|
<script src="../../build/js/intlTelInput.js?1400377268998"></script>
|
|
<script src="../js/onlyCountriesEurope.js?1400377268998"></script>
|
|
</body>
|
|
</html>
|
|
<!-- Localized --> |