搜外网>搜外问答>问答页面

哪位大侠能帮我写一下移动适配正则,PC和移动端地址已给出。 悬赏3元 已结束

主页:

PC: http://www.weipuce.com/index.html

移动: http://m.weipuce.com/index.html

栏目页:

http://www.weipuce.com/a/liuyanfankui/

http://m.weipuce.com/a/liuyanfankui/


http://www.weipuce.com/a/guanyuwomen/

http://m.weipuce.com/a/guanyuwomen/


http://www.weipuce.com/a/xinwenzixun/

http://m.weipuce.com/a/xinwenzixun/

内容页:

http://www.weipuce.com/a/xinwenzixun/58.html

http://m.weipuce.com/a/xinwenzixun/58.html


http://www.weipuce.com/a/xinwenzixun/44.html

http://m.weipuce.com/a/xinwenzixun/44.html


http://www.weipuce.com/a/chanpinzhanshi/dalishiEOban/23.html

http://m.weipuce.com/a/chanpinzhanshi/dalishiEOban/23.html


http://www.weipuce.com/a/changfangshebei/43.html

http://m.weipuce.com/a/changfangshebei/43.html


http://www.weipuce.com/a/chanpinzhanshi/yishumianqiban/67.html

http://m.weipuce.com/a/chanpinzhanshi/yishumianqiban/67.html


http://www.weipuce.com/a/gongchenganli/42.html

http://m.weipuce.com/a/gongchenganli/42.html


http://www.weipuce.com/a/chanpinzhanshi/fangyushiwenban/41.html

http://m.weipuce.com/a/chanpinzhanshi/fangyushiwenban/41.html


http://www.weipuce.com/a/chanpinzhanshi/dalishiEOban/24.html

http:// m.weipuce.com/a/chanpinzhanshi/dalishiEOban/24.html[?]

追加问题
    5 人参与回答
崔家大院
崔家大院 · 网站诊断、建站、快速排名
无量 等 1 人赞同该回答

楼上的方式试一下

我喜欢响应式,不用搞这么多规则

楼上方法试一下

百度搜索移动适配正则

漫天飞
漫天飞 · 织梦建站仿站
  1. <script type="text/javascript">
  2. // borwserRedirect
  3. (function browserRedirect(){
  4. var sUserAgent = ();
  5. var bIsIpad = (/ipad/i) == 'ipad';
  6. var bIsIphone = (/iphone os/i) == 'iphone os';
  7. var bIsMidp = (/midp/i) == 'midp';
  8. var bIsUc7 = (/rv:) == 'rv:';
  9. var bIsUc = (/ucweb/i) == 'web';
  10. var bIsCE = (/windows ce/i) == 'windows ce';
  11. var bIsWM = (/windows mobile/i) == 'windows mobile';
  12. var bIsAndroid = (/android/i) == 'android';
  13. if(bIsIpad || bIsIphone || bIsMidp || bIsUc7 || bIsUc || bIsCE || bIsWM || bIsAndroid ){
  14. window. = '

    ';
  15. }
  16. })();
  17. </script>
SEO培训招生中
188