LukevdPalen
11/6/2014 - 11:02 AM

Check ie version javascript

Check ie version javascript

/**
 * Return whether or not is the visitor is using a msei browser and which version it's using
 * @return {Mixed} return false boolean or a number that reflects to the version the visitor is using
 */
function msieversion() {
        var ua = window.navigator.userAgent;
        var msie = ua.indexOf("MSIE ");

        if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./))      // If Internet Explorer, return version number
            return(parseInt(ua.substring(msie + 5, ua.indexOf(".", msie))));
        else                 // If another browser, return 0
            return false;

   return false;
}