js判断IE浏览器及版本号

时间:2020-05-09 12:20:15   收藏:0   阅读:44
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;
    }
}

 

原文:https://www.cnblogs.com/xxySsm/p/12856319.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!