日常小记

通过js屏蔽国内某地区or城市的访问

<script type="text/javascript" src="https://ip.ws.126.net/ipquery";></script><!--网易IP库-->
<script>
var province=localAddress.province;
if(province.indexOf('某某省') != -1){

window.location.href = '自定义跳转地址';

}
</script>

<script type="text/javascript" src="https://ip.ws.126.net/ipquery";></script><!--网易IP库-->
<script>
var city=localAddress.city;
if(city.indexOf('某某市') != -1){

window.location.href = '自定义跳转地址';

}
</script>

回复

This is just a placeholder img.