ScriptEngineMajorVersion

JScript2.0+Syntax

ScriptEngineMajorVersion()

Description

The ScriptEngineMajorVersion function returns the actual major version number of the scripting engine contained on the user's machine.

Example

Listing 9.121 prints the major version number of the Internet Explorer browser interpreting the script.

Listing 9.121 Using the ScriptEngineMajorVersion Function to Retrieve the Major Version Number of the Scripting Engine in an Internet Explorer Browser
<script language="JScript">
<!-Hide

// Write the build number to the page
document.write("Major Version: " + ScriptEngineMajorVersion());

// End hide -->
</script>
						

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.