您好,我需要帮助来获取 PHP 变量中国家代码的值。我正在使用一个名为“国际电话输入”的 Jquery 插件。
这是我的输入和脚本。
<div class="group">
<!-- <input type="text" name="phone" > -->
<!-- Changes -->
<input type="tel" id="phone" name="phone" placeholder="Phone No."
style="color: #916409;"><span class="highlight"></span><span class="bar">
</span>
<label style="color: #916409;"></label>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
</script>
<script src="src/js/intlTelInput.js"></script>
<script src="src/js/intlTelInput.min.js"></script>
<script>
$("#phone").intlTelInput();
</script>
我想要国家代码值,以便我可以将其发送到数据库。任何帮助,将不胜感激