All elements in a HTML document are actually objects with properties/attributes associated with each type of object/element.
The 'this' keyword simply refers to the current object.
for example:
say you have an textbox whose value (user input) you want to have processed in some way whenever the user changes the text input.
Code:
<input type="text" id="txtInp" onchange="doSomething(this.value);" />
The 'this' in this.value refers to the current object, which in this case is the <input> element and the 'value' in this.value refers to the current value of the textbox which is the user inputed text string.
So if the user enters "hello world" in the textbox, the value "hello world" will be passed to the function doSomething();
For further info on the Document Object Model (DOM), maybe have a look at this:
http://www.w3schools.com/HTMLDOM/dom_intro.asp
Bookmarks