var isIE = function(ver){ var b = document.createElement('b'); b.innerHTML = '
Home > Article > Web Front-end > How is the IE version determined?
Judgment of each version of IE
But there are still some flaws: ie10 and 11 can’t judge
///isIE 10
}
Determine whether the browser is an ie browser. Use this line of code if (window.ActiveXObject || "ActiveXObject" in window) to determine the browser type. If it is an IE browser, it returns true, otherwise it returns false. In the case, an alert pop-up box will pop up to show whether it is an IE browser.
<script></p>
<p>function test(){</p>
<p> if (window.ActiveXObject || "ActiveXObject" in window){</p>
<p> alert(" ie")</p>
<p> }else{</p>
<p> alert("not ie")</p>
<p> }</p>
<p>}</p>
<p></script>
function JudgeBroswer() { if($.browser.msie) { alert("this is msie!"); //IE } else if($.browser.safari) { alert("this is safari!"); //Safari } else if($.browser.mozilla) { alert("this is mozilla!"); //Firefox } else if($.browser.opera) { alert("this is opera"); //Opera } }
The above is the detailed content of How is the IE version determined?. For more information, please follow other related articles on the PHP Chinese website!