ScriptEngine

JScript2+Syntax

ScriptEngine()

Description

The ScriptEngine function has three possible return values: JScript, VBScript, and VBA. When implemented in JavaScript scripts, this function returns JScript.

Example

Listing 9.119 prints the complete version information for the Internet Explorer browser interpreting the script. In addition to the ScriptEngine function, it also uses other Internet Explorer specific functions. The results of loading this example can be seen in Figure 9.1.

Figure 9.1. Results of running Listing 9.119 in Internet Explorer 5.

Listing 9.119 Using the ScriptEngine Function to Retrieve Information About ...

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.