Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

JScript this Statement

Refers to the current object.

Syntax: JScript this Statement

this.property

Remarks: JScript this Statement

The this keyword is typically used in object constructors to refer to the current object. In the following example, this refers to the newly created Car object, and assigns values to three properties:

function Car(color, make, model)

{

this.color = color;

this.make = make;

this.model = model;

}

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

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.