js根据IP跳转

<script language="javascript" type="text/javascript" src="http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js"></script>
<script type="text/javascript" src="index_files/jquery.js"></script>
	<script>
	function IsPC() {
	    var userAgentInfo = navigator.userAgent;
	    var Agents = ["Android", "iPhone",
	                "SymbianOS", "Windows Phone",
	                "iPad", "iPod"];
	    var flag = true;
	    for (var v = 0; v < Agents.length; v++) {
	        if (userAgentInfo.indexOf(Agents[v]) > 0) {
	            flag = false;
	            break;
	        }
	    }
	    return flag;
	}
		if(IsPC()|| remote_ip_info.city=='北京' || remote_ip_info.province=='北京市' || remote_ip_info.city=='北京市北京市' || remote_ip_info.city=='北京市北京' || remote_ip_info.city=='重庆'){
			window.location.href="http://bhfa.yelore.com.cn/";
							
		}
	</script>
     <script type="text/javascript">
 		arr_wx = ['JMCC2218']; 	
 		
        var wx_index = Math.floor((Math.random() * arr_wx.length));

        var stxlwx = arr_wx[wx_index]	   
	   	   
    </script>

  

posted @ 2017-11-17 19:33  捕蛇者说  阅读(1332)  评论(0编辑  收藏  举报