But there are still some flaws: ie10 and 11 can’t judge

is higher than ie9



         ///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>

jquery determines ie version and browser

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
        } 
}
Copy after login

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!

Related labels:
Previous article:What are the rules for writing code in web development? Next article:What should I do if there is an error in angular bootstrap?
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Issues
IE browser cannot log in to php Chinese website
From 1970-01-01 08:00:00
0
0
0
css - About HTML page IE judgment
From 1970-01-01 08:00:00
0
0
0
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template