Created
August 21, 2017 10:58
-
-
Save Tenderfeel/5ed61d43c33cc815a6e25d69f540752c to your computer and use it in GitHub Desktop.
user agent check of IE
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
var isIE = (function() { | |
var ua = navigator.userAgent.toLowerCase(); | |
if (ua.indexOf('msie') >= 0 || ua.indexOf('trident') >= 0) { | |
var array = /(msie|rv:?)\s?([\d\.]+)/.exec(ua); | |
return (array) ? array[2] : true; | |
} else { | |
return false; | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment