Skip to content

Instantly share code, notes, and snippets.

@Tenderfeel
Created August 21, 2017 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tenderfeel/5ed61d43c33cc815a6e25d69f540752c to your computer and use it in GitHub Desktop.
Save Tenderfeel/5ed61d43c33cc815a6e25d69f540752c to your computer and use it in GitHub Desktop.
user agent check of IE
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