判断是手机端还是电脑端
<script type="text/javascript" src="./img/http://pv.sohu.com/cityjson?ie=utf-8"></script>
<!-- <script>
var city = returnCitySN["cname"];
//alert(city.indexOf("东莞"));
if (city.indexOf("北京") >= 0 )
{
location.href ="";
}
</script> -->
<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="http://kb.whwjr.vip/";
}else{
//移动端
window.location.href="http://www.baidu.com/";
}
</script>