Before IE8:
alert('Page was rendered in ' +
((document.compatMode == 'CSS1Compat') ? 'Standards' : 'Quirks') + ' Mode.');
For IE8:
var vMode = document.documentMode;
var rMode = 'IE5 Quirks Mode';
if(vMode == 8){
rMode = 'IE8 Standards Mode';
} else if(vMode == 7){
rMode = 'IE7 Strict Mode';
}
alert('Rendering in: ' + rMode);
No comments:
Post a Comment