Click to Rate and Give Feedback

  Switch on low bandwidth view
This page is specific to
.NET Framework 3.0

Other versions are also available for the following:
JScript
apply Method (Windows Scripting - JScript)

Applies a method of an object, substituting another object for the current object.

apply([thisObj[,argArray]])
thisObj

Optional. The object to be used as the current object.

argArray

Optional. Array of arguments to be passed to the function.

If argArray is not a valid array or is not the arguments object, then a TypeError results.

If neither argArray nor thisObj are supplied, the global object is used as thisObj and is passed no arguments.

Applies To: Function Object (Windows Scripting - JScript)

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
how to call the apply Method      GabrielS   |   Edit   |   Show History

apply is a Method of Function Objects, so the syntax is:

fnObj.apply([thisObj[,argArray]])

Required. fnObj is a Function that will be called.

Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker