国际化手机号码输入插件yii2-phone-input使用参考(获得国家代码)

https://github.com/Borales/yii2-phone-input


$("#phone").on("countrychange", function(e, countryData) {
  // do something with countryData
});

When the countrychange event fires, countryData will contain an object with the country data:

{
    "name": "United States",
    "iso2": "us",
    "dialCode": "1",
    "priority": 0,
    "areaCodes": null
}


参考地址:


https://stackoverflow.com/questions/48446511/getting-country-code-through-form-in-php-intl-tel

猜你喜欢

转载自blog.csdn.net/dyang129/article/details/80741530