原文地址: http://julying.com/blog/determine-the-version-number-of-ie-with-javascript/
var _IE = (function(){ var v = 3, div = document.createElement(‘div‘); while ( div.innerHTML = ‘<!--[if gt IE ‘ + (++v) + ‘]>v<![endif]-->‘, div.innerHTML ); return v > 4 ? v : false ; }());
在原文基础上改进了一下.
但有人反映在IE11下返回false!
时间: 2024-11-03 21:49:55