Last active
December 17, 2015 12:38
-
-
Save dipaktelangre/5610722 to your computer and use it in GitHub Desktop.
Check IE versions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Check IE Version | |
| // This function returns Internet Explorer's major version number, | |
| // or 0 for others. It works by finding the "MSIE " string and | |
| // extracting the version number following the space, up to the decimal | |
| // point, ignoring the minor version number | |
| <SCRIPT LANGUAGE="JavaSCRIPT"> | |
| function msieversion() | |
| { | |
| var ua = window.navigator.userAgent | |
| var msie = ua.indexOf ( "MSIE " ) | |
| if ( msie > 0 ) // If Internet Explorer, return version number | |
| return parseInt (ua.substring (msie+5, ua.indexOf (".", msie ))) | |
| else // If another browser, return 0 | |
| return 0 | |
| } | |
| </SCRIPT> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment