Determine whether it is IE browser 360 compatibility mode

Internet Explorer is the only browser that supports ActiveX objects.
We can determine whether it is an IE browser by detecting whether the current environment supports ActiveX objects. First judge whether there is an ActiveXObject attribute through the window object, if it exists, it means that the current environment supports ActiveX objects; otherwise, judge whether there is an "ActiveXObject" attribute in the window object, if it exists, it still means that the current environment supports ActiveX objects.

if(!!window.ActiveXObject || "ActiveXObject" in window) {
	console.log('当前为IE浏览器')
}

Guess you like

Origin blog.csdn.net/weixin_49098968/article/details/131104955