Answers for "IE BROWSER CHECK"

0

IE BROWSER CHECK

function getMSIEVersion()
{
  var version = -1;
  
  if (navigator)
  {
    var userAgent = navigator.userAgent;
    var regEx = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    
    if (regEx.exec(userAgent) != null) {
      version = parseFloat(RegExp.$1);
    }
  }

  return version;
}

function getTridentVersion()
{
  var version = -1;
  
  if (navigator)
  {
    var userAgent = navigator.userAgent;
    var regEx = new RegExp("Trident/([0-9]{1,}[\.0-9]{0,})");
    
    if (regEx.exec(userAgent) != null) {
      version = parseFloat(RegExp.$1);
    }
  }

  return version;
}
Posted by: Guest on September-08-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language