• isPCBroswer:检测是否为PC端浏览器模式


    function isPCBroswer() {    
      let e = navigator.userAgent.toLowerCase()

        , t = "ipad" == e.match(/ipad/i)

        , i = "iphone" == e.match(/iphone/i)

        , r = "midp" == e.match(/midp/i)

        , n = "rv:1.2.3.4" == e.match(/rv:1.2.3.4/i)

        , a = "ucweb" == e.match(/ucweb/i)

        , o = "android" == e.match(/android/i)

        , s = "windows ce" == e.match(/windows ce/i)

        , l = "windows mobile" == e.match(/windows mobile/i);

        return !(t || i || r || n || a || o || s || l)
    }
  • 相关阅读:
    DOM基本介绍
    BOM的基本介绍
    对象
    函数
    时钟
    双色球
    JS数据结构
    微信扫二维码根据系统下载apk
    javascript相关积累
    ajax精华
  • 原文地址:https://www.cnblogs.com/EternalZH/p/12213780.html
Copyright © 2020-2023  润新知