Executes an Active Scripting function defined in an HTML page.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

Examples
The following code example executes the contents of a script in a Web page. The code example requires that you have loaded the following Web page.
<HTML>
<SCRIPT>
function test(name, address) {
window.alert("Name is " + name + "; address is " + address);
}
</SCRIPT>
<BODY>
</BODY>
</HTML>
Private Sub InvokeTestMethod(ByVal Name As String, ByVal Address As String)
If (Not (WebBrowser1.Document Is Nothing)) Then
Dim ObjArr(2) As Object
ObjArr(0) = CObj(New String(Name))
ObjArr(1) = CObj(New String(Address))
WebBrowser1.Document.InvokeScript("test", ObjArr)
End If
End Sub
private void InvokeTestMethod(String name, String address)
{
if (webBrowser1.Document != null)
{
Object[] objArray = new Object[2];
objArray[0] = (Object)name;
objArray[1] = (Object)address;
webBrowser1.Document.InvokeScript("test", objArray);
}
}

See Also