AvailabilityJavaScript 1.5; JScript 5.5; ECMAScript v3 Synopsisfunction.call(thisobj, args...) Arguments
ReturnsWhatever value is returned by the invocation of function. Throws
Descriptioncall( ) invokes the specified function as if it were a method of thisobj, passing it any arguments that follow thisobj in the argument list. The return value of call( ) is the value returned by the function invocation. Within the body of the function, the this keyword refers to the thisobj object. Use Function.apply( ) instead if you want to specify the arguments to pass to the function in an array. Example// Call the default Object.toString( ) method on an object that // overrides it with its own version of the method. Note no arguments. Object.prototype.toString.call(o); See Also |