cannot read property 'msie' of undefined

//在代码中加上
<script type="text/javascript">
    jQuery.browser = {};
    (function () {
        jQuery.browser.msie = false;
        jQuery.browser.version = 0;
        if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
            jQuery.browser.msie = true;
            jQuery.browser.version = RegExp.$1;
        }
    })();
</script>

参考:https://blog.csdn.net/niexia_/article/details/78021821?locationNum=2&fps=1

发布了102 篇原创文章 · 获赞 91 · 访问量 54万+

猜你喜欢

转载自blog.csdn.net/sinat_32034679/article/details/82383131