简体   繁体   English

如何使用国家代码或国家名称获取国家拨号代码?

[英]How to get country dialling code using country code or country name?

I want to get Country dialling code like +91(India) through Country Name (India) OtherWise Country Code (IN). 我想通过国家/地区名称(India)/其他国家/地区代码(IN)获取国家/地区拨号代码,例如+91(India) )。

Example through I was getting country name and country code, 我通过示例得到了国家名称和国家代码,

$.getJSON('http://freegeoip.net/json/', function(result) {
  alert(result.country_code); 
  alert(result.country_name);    
});

I know this i way too late but it might help someone at some point 我知道我为时已晚,但在某些时候可能会对某人有所帮助

RestCountries 休息国家

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM