JavaScript tutorial:
ScriptEngineMajorVersion function

 

The ScripEngineMajorVersion is use to get the major version number of the scripting engine in use.

Syntax

ScriptEngineMajorVersion( )

Return Values

The return value corresponds directly to the version information contained in the dynamic-link library(DLL) for the scripting language in use.

Example

The following code illustrates the use of the ScriptEngineMajorVersion function:

 <HTML>
<HEAD>
<SCRIPT LANGUAGE = JavaScript>
function GetScriptEngineInfo()
{
var s;
s = ""; // Build string with necessary info.
s += ScriptEngine() + " Version ";
s += ScriptEngineMajorVersion() + ".";
s += ScriptEngineMinorVersion() + ".";
s += ScriptEngineBuildVersion();
return(s);
}
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT LANGUAGE= JavaScript>
document.write(GetScriptEngineInfo());
</SCRIPT>
</BODY>
</HTML>

  To run the code above, paste it into JavaScript Editor, and go to View, Internal Page Viewer or press F5.

See also: ScriptEngine Function, ScriptEngineBuildVersion Function, ScriptEngineMinorVersion Function