Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[IHTMLWindow2::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.
retVal = object.execScript(code, language);
code [in]
Type: BSTRBSTR that specifies the code to be executed.
language [in]
Type: BSTRBSTR that specifies the language in which the code is executed. The language defaults to JScript.
There are no standards that apply here.
Script executed through the IHTMLWindow2::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 JScript, such as the Microsoft Visual Basic Scripting Edition (VBScript) MsgBox function.