Microsoft® JScript
this Statement
See Also
Language Reference 


Description
Refers to the current object.
Syntax

this.property

Remarks

The this keyword is typically used in object constructors. It allows a way to refer to the current object. For example:


function Car( color, make, model )
{
  this.color = color;
  this.make = make;
  this.model = model;
}
In this example, this refers to the newly created Car object, and assigns values to three properties.

For client versions of JScript, this refers to the window object if used outside of the context of any other object.


© 1996 by Microsoft Corporation.


Casa de Bender