Code: Select all
var trident=navigator.userAgent.match(/Trident\/(\d+)/);var msie=navigator.userAgent.match(/MSIE.(\d+)/);if(parseInt(trident[1],10)+4!=parseInt(msie[1],10))document.write("<br>IE in Compatibility mode!");
Moderators: Developer, Contributor
Code: Select all
var trident=navigator.userAgent.match(/Trident\/(\d+)/);var msie=navigator.userAgent.match(/MSIE.(\d+)/);if(parseInt(trident[1],10)+4!=parseInt(msie[1],10))document.write("<br>IE in Compatibility mode!");