, , script.
// ieUserAgent
var ieUserAgent = {
init: function () {
var ua = navigator.userAgent;
this.compatibilityMode = false;
if(ua.indexOf("MSIE") == -1){
this.version = 0;
return 0;
}
if(ua.indexOf("compatible") == -1){
this.compatibilityMode = false;
return 0;
}else{
this.compatibilityMode = true;
return 0;
}
}
};
ieUserAgent.init();
-OR -
/**
* , IE
*
* @returns {boolean}
*/
function isIECompatibilityMode() {
var ua = navigator.userAgent;
if (ua.indexOf("MSIE") == -1) {
return false;
}
return (ua.indexOf("compatible") != -1); }