惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
博客园_首页
aimingoo的专栏
aimingoo的专栏
IT之家
IT之家
美团技术团队
GbyAI
GbyAI
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
www.infosecurity-magazine.com
www.infosecurity-magazine.com
S
Security @ Cisco Blogs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Jina AI
Jina AI
The Cloudflare Blog
O
OpenAI News
雷峰网
雷峰网
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
F
Fortinet All Blogs
量子位
C
CERT Recently Published Vulnerability Notes
V
V2EX
J
Java Code Geeks
H
Help Net Security
小众软件
小众软件
H
Hacker News: Front Page
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tor Project blog
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Martin Fowler
Martin Fowler
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Scott Helme
Scott Helme
N
News | PayPal Newsroom
Vercel News
Vercel News
爱范儿
爱范儿
TaoSecurity Blog
TaoSecurity Blog
Webroot Blog
Webroot Blog
博客园 - 叶小钗
T
Threat Research - Cisco Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
Netflix TechBlog - Medium
宝玉的分享
宝玉的分享
G
GRAHAM CLULEY
MyScale Blog
MyScale Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
L
Lohrmann on Cybersecurity
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
S
Schneier on Security

博客园 - Jack Niu

“Microsoft.Build.Tasks.Xaml.PartialClassGenerationTask“ task could not be loaded from the assembly ASP.NET Core MVC 入门到精通 - 1. 开发必备工具 (2021) ASP.NET Core MVC 入门到精通 - 3. 使用MediatR 算法 - 计算汉明距离 浏览器(Cache)的缓存逻辑(HTTP条件请求) 算法: 合并两个有序链表 前端进阶(2)使用fetch/axios时, 如何取消http请求 前端进阶(1)Web前端性能优化 2021 Top 100 C#/.NET Interview Questions And Answers 安装umi后,使用umi提示不是内部或者外部命令 解决国内不能访问github的问题 (算法) - 不使用递归,实现斐波那契数列 2021 .NET/dotnet Core/C# 面试题及参考答案 2021 Vue.js 面试题汇总及答案 CSS3 Flex Box 弹性盒子、弹性布局 Angular入门到精通系列教程(15)- 目录结构(工程结构)推荐 Angular入门到精通系列教程(14)- Angular 编译打包 & Docker发布 Angular入门到精通系列教程(13)- 路由守卫(Route Guards) Angular入门到精通系列教程(12)- 路由(Routing) Angular入门到精通系列教程(11)- 模块(NgModule),延迟加载模块
最简单的判断是否为IE浏览器的方法 - document.documentMode
Jack Niu · 2021-10-25 · via 博客园 - Jack Niu

作为当今最差的浏览器,虽说IE即将推出历史的舞台,但是因为项目需要还是需要支持。那么必须判断是否是IE,如果是IE,需要做些特殊处理。

document.documentMode 是IE特有的属性,可以根据这个值判断是否为IE。如:

var isIE =  document.documentMode !== undefined;

确实是简单好用吧 :)

基本来说,document.documentMode的值就是IE的版本号,如:

  • 7 - The page is displayed in IE7 mode
  • 8 - The page is displayed in IE8 mode
  • 9 - The page is displayed in IE9 mode
  • 10 - The page is displayed in IE10 mode
  • 11 - The page is displayed in IE11 mode