简单明了判断浏览器
Firefox:
typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;

chrome

typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('chrome') > -1;

IE10 及之前

typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('ie') > -1;

IE11
typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('trident') > -1;

简单明了区分IE,Firefox,chrome主流浏览器的更多相关文章

  1. IE/Firefox/Chrome等浏览器保存Cookie的位置

    IE/Firefox/Chrome等浏览器保存Cookie的位置 原文  http://smilejay.com/2013/04/browser-cookie-location/   前面写了篇长文( ...

  2. js导出execl兼容ie Chrome Firefox各种主流浏览器(js export execl)

    第一种导出table布局的表格 <html> <head> <meta charset="utf-8"> <script type=&qu ...

  3. Java+selenium+Firefox/ IE/ Chrome主流浏览器自动化环境搭建

    一.java+selenium+firefox 1.环境准备:JDK1.8 2.安装firefox浏览器v59 3.下载驱动:https://github.com/mozilla/geckodrive ...

  4. js导出execl 兼容ie Chrome Firefox各种主流浏览器(js export execl)

    第一种导出table布局的表格 1 <html> 2 3 <head> 4 <meta charset="utf-8"> 5 <scrip ...

  5. jQuery+CSS 简单代码实现遮罩层( 兼容主流浏览器 )

    /* ** jQuery版本:jQuery-1.8.3.min.js ** 浏览器:Chrome( v31.0.1650.63 m ),IE11,Firefox( v32.0.1 ),IETester ...

  6. 一表格简单明了区分BI和大数据

    大数据和BI两词现阶段处于刷屏状况,但是,很多人对于这两词确傻傻分不清.改怎么区别呢?本文将从概念.应用.发展趋势等多个角度对大数据和BI进行区分. BI(Business Intelligence) ...

  7. 简单明了区分escape、encodeURI和encodeURIComponent

    一.前言 讲这3个方法区别的文章太多了,但是大部分写的都很绕.本文试图从实践角度去讲这3个方法. 二.escape和它们不是同一类 简单来说,escape是对字符串(string)进行编码(而另外两种 ...

  8. 简单明了区分escape、encodeURI和encodeURIComponent(转)

    一.前言 讲这3个方法区别的文章太多了,但是大部分写的都很绕.本文试图从实践角度去讲这3个方法. 二.escape和它们不是同一类 简单来说,escape是对字符串(string)进行编码(而另外两种 ...

  9. 【转】简单明了区分escape、encodeURI和encodeURIComponent

    一.前言 讲这3个方法区别的文章太多了,但是大部分写的都很绕.本文试图从实践角度去讲这3个方法. 二.escape和它们不是同一类 简单来说,escape是对字符串(string)进行编码(而另外两种 ...

随机推荐

  1. 【error】'isnan' was not declared in this scope

    error问题 'isnan' was not declared in this scope isnan在cmath中被取消宏定义: // These are possible macros impo ...

  2. JavaBasic_05

    方法 简述:实现特定功能的代码块 格式 修饰符: 返回值类型 方法名(参数类型 参数名1,参数类型 参数名2…){           函数体;           return 返回值;} 方法格式 ...

  3. CodeForces - 1097F:Alex and a TV Show (bitset & 莫比乌斯容斥)

    Alex decided to try his luck in TV shows. He once went to the quiz named "What's That Word?!&qu ...

  4. 在windows 上的RedisClient 上连接远程linux redis ("jave.net.ConnectException: Connection refused:connect")

    1.把防火墙禁用掉 2.redis.conf配置文件,注释掉bind 127.0.0.1 3.重启redis服务

  5. 四则运算可能需要注意的地方V1.1

    作业:https://edu.cnblogs.com/campus/nenu/SWE2017FALL/homework/997 文档下载:https://coding.net/u/Dawnfox/p/ ...

  6. 实验吧—隐写术——WP之 SB!SB!SB!

    我们先打开解题链接,里面是一张愤怒的小鸟里的小猪~ 既然这是隐写题,那么肯定要把图片下载下来进行分析咯~ 下载下来之后,我们看到题目中提示:LSB 什么是LSB? LSB(Least Signific ...

  7. canvas 使用 isPointInPath() 判断鼠标位置是否在绘制的元素上

    canvas 里绘制的图形不是一个实体 DOM,所以要给每个绘制的图形添加事件操作比给 DOM 添加事件要复杂很多. 所以,我们需要使用一个 canvas 的 isPointInPath(x, y) ...

  8. 调试 shell script 方法

    wade@V1088:~$ cat b.sh#!/bin/bash dir=`pwd` dir=$dir'/' for f in `ls *.png` do echo $dir$f done 看每一行 ...

  9. NDK: GCC 4.6 crashes

    used version: NDK r9b, arm-linux-androideabi-4.6 GCC,  with "-O2 -finline-limit=24". got t ...

  10. js动态加载数据并合并单元格

    js动态加载数据合并单元格, 代码如下所示,可复制直接运行: <!DOCTYPE HTML> <html lang="en-US"> <head> ...