1、屏蔽google chrome浏览器
<script type="text/javascript">
function no()
{
alert('系统检测出你使用了Google Chrome浏览器,它将偷窥用户隐私,此网站不准Google Chrome相关软件进入,为了你的上网安全,推荐改用IE以及以IE为内核的浏览器(或其它除Google Chrome以外的浏览器)再行访问本站,谢谢合作!');
document.execCommand("stop");
location.href=" http://www.baidu.com ";
}
var f=false;if((navigator.userAgent.toLowerCase().indexOf("chrome")>-1)){f=true;}try{if(window.external&&window.external.twGetRunPath){var r=external.twGetRunPath();if((r&&r.toLowerCase().indexOf("chrome")>-1)){f=true;}}}catch(ign){f=false;}f&&(no());
</script>
效果如下图:
2、 屏蔽360浏览器
<script type="text/javascript">
function no()
{
alert('系统检测出你使用了360浏览器,它将偷窥用户隐私,此网站不准360相关软件进入,为了你的上网安全,推荐改用IE以及以IE为内核的浏览器(或其它除360以外的浏览器)再行访问本站,谢谢合作!');
document.execCommand("stop");
location.href="http://www.baidu.com";
}
var f=false;if((navigator.userAgent.toLowerCase().indexOf("360")>-1)){f=true;}try{if(window.external&&window.external.twGetRunPath){var r=external.twGetRunPath();if((r&&r.toLowerCase().indexOf("360")>-1)){f=true;}}}catch(ign){f=false;}f&&(no());
</script>
<script type="text/javascript">
function no()
{
alert('系统检测出你使用了Google Chrome浏览器,它将偷窥用户隐私,此网站不准Google Chrome相关软件进入,为了你的上网安全,推荐改用IE以及以IE为内核的浏览器(或其它除Google Chrome以外的浏览器)再行访问本站,谢谢合作!');
document.execCommand("stop");
location.href=" http://www.baidu.com ";
}
var f=false;if((navigator.userAgent.toLowerCase().indexOf("chrome")>-1)){f=true;}try{if(window.external&&window.external.twGetRunPath){var r=external.twGetRunPath();if((r&&r.toLowerCase().indexOf("chrome")>-1)){f=true;}}}catch(ign){f=false;}f&&(no());
</script>
效果如下图:
2、 屏蔽360浏览器
<script type="text/javascript">
function no()
{
alert('系统检测出你使用了360浏览器,它将偷窥用户隐私,此网站不准360相关软件进入,为了你的上网安全,推荐改用IE以及以IE为内核的浏览器(或其它除360以外的浏览器)再行访问本站,谢谢合作!');
document.execCommand("stop");
location.href="http://www.baidu.com";
}
var f=false;if((navigator.userAgent.toLowerCase().indexOf("360")>-1)){f=true;}try{if(window.external&&window.external.twGetRunPath){var r=external.twGetRunPath();if((r&&r.toLowerCase().indexOf("360")>-1)){f=true;}}}catch(ign){f=false;}f&&(no());
</script>