Home | Javascript validator | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Microsoft® JScript® this Statement |
Language Reference Version 1 |
Refers to the current object.
this.property
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:For client versions of JavaScript, this refers to the window object if used outside of the context of any other object.function Car(color, make, model) { this.color = color; this.make = make; this.model = model; }
Home | Javascript validator | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |