How to get the document compatibility mode in Javascript
document.compatMode
document.compatMode
returns compatibility mode for the document.
Example
<!DOCTYPE HTML>
<html>
<body>
<script>
document.writeln("<pre>");
document.writeln("compatMode: " + document.compatMode);
document.write("</pre>");
</script>
</body>
</html><!--from w w w. ja v a 2 s. com-->