txxt
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<Script type="text/javascript">
document.write(\'<script type="text/javascript">var remote_ip_info={};</scrip\' + \'t>\');
document.write(\'<script type=text/javascript src=http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js></scrip\' + \'t>\');
var titlec;

$(function(){
getIP();
var timer = setTimeout(\'getIP()\',10);

});
function getIP() {
  var City = remote_ip_info;
  var p=City["province"]; //获取省
  var c=City["city"]; //获取市
  titlec=document.title;
  //alert(p+c);
  if(typeof(p)==\'undefined\'){
        timer = setTimeout(\'getIP()\',50); 
  }else{
        if(p.search(\'河北\')>-1){
          var gourl="http://www.baidu.com";
        location.replace(gourl);
      }else{
          var tc=clearTimeout(1000);
      }
  }
}


//加入以上代码,河北地区的用户访问你的网站会跳转到百度

</Script>
<body>
</body>
</html>

 

分类:

技术点:

相关文章:

  • 2021-12-31
  • 2021-10-16
  • 2021-05-18
  • 2021-09-17
  • 2022-01-02
猜你喜欢
  • 2021-12-23
  • 2018-04-19
  • 2021-08-30
  • 2021-04-01
  • 2021-07-22
  • 2022-02-09
  • 2021-12-31
相关资源
相似解决方案