jQuery基于国家/地区代码的简单重定向代码

时间:2018-07-21 11:54:52

标签: jquery geolocation

我找到了能正常工作的jquery代码

$.get("https://ipinfo.io", function (response) {
  $("#ip").html("IP: " + response.ip);
  $("#address").html("" + response.country);
  $("#details").html(JSON.stringify(response, null, 4));
}, "jsonp");

div id="address" (I cant add the  in front as I am new in stackoverflow 

我想改进它并做类似的事情。我对jquery / javascript不好,因此无法继续。

如果国家/地区代码CY&(document.documentElement.lang ===“ zh-CN”),则window.location.href = http://www.blabla.com;

0 个答案:

没有答案
相关问题