判断浏览器大于等于ie9

方便自己查找
<script>
(function (window) {
var theUA = window.navigator.userAgent.toLowerCase();
if ((theUA.match(/msiesd+/) && theUA.match(/msiesd+/)[0]) || (theUA.match(/tridents?d+/) &&
theUA.match(/tridents?d+/)[0])) {
var ieVersion = theUA.match(/msiesd+/)[0].match(/d+/)[0] || theUA.match(/tridents?d+/)[0];
if (ieVersion <= 9) {
console.log('浏览器小于IE9,请升级!')
} else {
//执行某些操作
return true
}
}
})(window);
</script>
原文地址:https://www.cnblogs.com/xiao-hui-hui/p/10275459.html