//判断是否是IE浏览器,包括Edge浏览器
function IEVersion() {
var userAgent = navigator.userAgent;
if (!!window.ActiveXObject || "ActiveXObject" in window)
return "IE";
else if (userAgent.indexOf("Edge") > -1) {
return "Edge"
}
else {
return "-1";
}
}
转载于:https://www.cnblogs.com/damsoft/p/6059970.html