js判断IE浏览器及版本号

function underIe11() {
    function IEVersion() {
        if (document.documentMode) return document.documentMode;
    }
    if (IEVersion()) {
        console.log('当前IE浏览器版本号是', IEVersion());
        if (IEVersion() < 10) {
            return true;
        } else {
            return false;
        }
    } else {
        console.log('当前浏览器可能不是IE浏览器');
        return false;
    }
}
活着Viva
原文地址:https://www.cnblogs.com/xxySsm/p/12856319.html