<!DOCTYPE html> <html> <title>test</title> <h1>TEST</h1> UserAgent: <span id="lblUserAgent"></span><br/> DocumentMode: <span id="lblDocumentMode"></span><br/> <script type="text/javascript"> var lblUserAgent = document.getElementById("lblUserAgent"); var lblDocumentMode = document.getElementById("lblDocumentMode"); lblUserAgent.innerText = window.navigator.userAgent; lblDocumentMode.innerText = document.documentMode; </script> </html>