假设pc/index.html是pc端的网页,mobile/index.html是移动端的网页
在外部设置一个html进行判断,分别跳转;
//判断如果是pc端,自动跳到pc/index.html
//安卓手机自动跳到mobile/index.html
var userAgent = navigator.userAgent.toLowerCase();
if(userAgent.indexOf('android') == -1 &&
userAgent.indexOf('iphone') == -1 &&
userAgent.indexOf('ipad') == -1)
location.href = 'pc/index.html';
else
location.href = 'mobile/index.html';