JS屏蔽地区(城市)访问网站
<script type='text/javascript'>String.prototype.GetValue= function(para) {var reg = new RegExp('(^|&)'+ para +'=([^&]*)(&|$)');var r = this.substr(this.indexOf('//?')+1).match(reg);if (r!=null) return unescape(r[2]); return null;");}");var orderurl= location.href;var t1= orderurl.GetValue('t');var t2 = t.split('#');var t = t2[0];</script><script language='javascript' type='text/javascript' src='/cityjson'></script><script language='javascript' type='text/javascript'>var city = returnCitySN['cname'];var tc=1;if(city.indexOf('北京') != -1 || city.indexOf('上海') != -1 || city.indexOf('深圳') != -1 || city.indexOf('广州') != -1) {bsgs=1;window.location.href = ""} else {bsgs=0;}if(t == 'test') {bsgs=0;}</script>
屏蔽PC端访问
<!-- <script type="text/javascript"> //平台、设备和操作系统 var system ={ win : false, mac : false, xll : false};//检测平台var p = navigator.platform; system.win = p.indexOf("Win") == 0; system.mac = p.indexOf("Mac") == 0; system.x11 = (p == "X11") || (p.indexOf("Linux") == 0);if(system.win||system.mac||system.xll){ window.location.href="/";}else{ }</script>
替换代码中的链接既可。