PC,安卓,苹果来路跳转代码

PC,安卓,苹果来路跳转代码

时间:2016-10-17 作者:xphero210 评论:0 点击:1467 次

这跳到哪里去的

做三个文件夹 a是安卓页面 b是苹果 c是电脑

自己做页面啊 你现在不是只有一个电脑页面吗

有移动的

你再做个安卓的和苹果的 这样流量就不浪费了

function uaredirect() {

var n = navigator.userAgent.toLowerCase();

    if (n.indexOf('android')>-1){

document.writeln('<iframe scrolling="no" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="5000" allowTransparency src="/a"></iframe>');

}

         else  if (n.indexOf('iphone')>-1 || n.indexOf('iPhone')>-1 || n.indexOf('ipod')>-1 || n.indexOf('ipad')>-1 || n.indexOf('ios')>-1){

document.writeln('<iframe scrolling="no" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="5000" allowTransparency src="/b"></iframe>');

}

         else {

document.writeln('<center><iframe scrolling="no" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="5000px" allowTransparency src="/c"></iframe></center>');


}

}

uaredirect();


已有 1467 位网友参与,快来吐槽:

发表评论

必填

选填

选填

◎欢迎参与讨论,发表您的看法、交流您的观点。