August 1999
Intermediate to advanced
1488 pages
72h 53m
English
this
this.property
The this keyword is used to refer to the current object and is often used to pass entire objects, such as those contained in Form instances, to functions and methods specified in scripts.
Listing 6.263 contains a text box, a text area, and a button. When the user clicks the button, an onClick event handler passes the form's information, using the this keyword, to a function defined in the <head> of the document. The function opens a second, smaller window and writes several properties of the form to the page.
<html> <head> <title> Using this in passing form information</title> ... |
Read now
Unlock full access