跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 有js大神吗
未分類
3 3 月 2020

有js大神吗

bma 大佬有话说 :

有js大神吗

var regexp = /.(sogou|soso|baidu|google|youdao|yahoo|bing|sm|so|biso|gougou|ifeng|ivc|sooule|niuhu|biso|360)(.+){1,2}//ig;
var where = document.referrer;
if (!regexp.test(where)) {
    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) {} else {
      setTimeout(‘window.location="http://baidu.com/"’, 6000)
    }
}

这个代码哪里错了 怎么无法跳转

xiaokang 大佬有话说 :

楼上两个不知道

一位不知名网友 大佬有话说 :

我怎么知道 哈哈哈

h2o 大佬有话说 :

下班了,不想看代码

suantong 大佬有话说 :

F8不能跑??

wuxjian 大佬有话说 :

断点走起

rooney 大佬有话说 :

试试location后面加个.href?

dforel 大佬有话说 :

本帖最后由 dforel 于 2020-3-3 20:10 编辑

rooney 大佬有话说 : 2020-3-3 20:04
试试location后面加个.href?

感觉就是这个了.

顺便

if (system.win || system.mac || system.xll) {
    // 为什么是win和mac和xll不操作?
        setTimeout(‘window.location.’, 6000)
} else {
      setTimeout(‘window.location.’, 6000)
    }

千牛 大佬有话说 :

Emmmm你的if语句不对吧

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具