The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

execScript method

[execScript is no longer supported. Starting with Internet Explorer 11, use eval. For info, see Compatibility changes.]

Executes the specified script in the provided language.


var retval = window.execScript(code, language);


code [in]

Type: String

String that specifies the code to be executed.

language [in]

Type: String

String that specifies the language in which the code is executed. The language defaults to JavaScript.

Return value

Type: Variant of type null

This method always returns null.

Standards information

There are no standards that apply here.


Script executed through the execScript method can access all global variables available to the calling script. This can be useful when you want the functionality of another scripting language that would not otherwise be available in JavaScript, such as the Microsoft Visual Basic Scripting Edition (VBScript) MsgBox function.

See also