We're going to check what rendering engine you're using. If you have several browsers installed in your work station, try the same script in all of them:
For the markup, you can use the following:
<body> <div id="browser-info"> <p>The rendering engine you're using is: </p> <p>The rendering engine's version is: </p> </div> </body>
Open your HTML document in a browser to preview your work. You should see the following figure (it shouldn't have the rendering engine information yet):
We'll get information about the browser engine name and version using
Browser.Engine.name
andBrowser.Engine.version
, and then assign them to the variablesbrowserEngine
andbrowserEngineVersion
. If for some reason we can't determine the values, we assign them values "Unknown" by using||
(which means "or"). To do this write:var browserEngine = Browser.Engine.name || "Unknown"; var browserEngineVersion...