ScriptEngine function is use to get a string representing the scripting language in use.
Syntax
ScriptEngine( )
Return Values
The ScriptEngine function can return any of the following strings:
String |
Description |
JavaScript |
Indicates that JavaScript is the current scripting engine. |
VBA |
Indicates that Visual Basic for Applications is the current scripting engine. |
VBScript |
Indicates that Visual Basic Scripting Edition is the current scripting engine. |
Example
The following code illustrates the use of the ScriptEngine 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: ScriptEngineBuildVersion Function, ScriptEngineMajorVersion Function, ScriptEngineMinorVersion Function |