设为首页 - 加入收藏
广告 1000x90
您的当前位置:主页 > 网站运营 > 正文

杰凡seo:手机UA跳转至m子域名JS代码

来源:网络分享 编辑:引流技巧 时间:2025-05-14

请将此代码添加至全局——嵌入相关——模板加载前嵌入:

  • <script>
  • (function() {
  • if(window.screen.width < 1000 && location.hostname.split('.')[0] != 'm') {
  • location.href = 'http://m.4xseo.com' + location.pathname + location.search + location.hash;
  • }
  • })();
  • </script>
  • 上述代码UC浏览器不跳转,请使用下列代码:

  • <script>
  • $(function() {
  • if($(window).width() < 1000 && location.hostname.split('.')[0] != 'm') {
  • location.href = 'http://m.4xseo.com' + location.pathname + location.search + location.hash;
  • }
  • })
  • </script>
  • 请将上述代码中的http://m.4xseo.com替换为http://m.你的主域名

    相关推荐:

    栏目分类

    微商引流技巧网 www.yinliujiqiao.com 联系QQ:1716014443 邮箱:1716014443@qq.com

    Copyright © 2019-2024 强大传媒 网站地图 rss地图

    Top