Changes

Building Forms with JavaScript

156 bytes added, 20:01, 15 May 2007
The JavaScript Text Object
Now that we have covered some of the basics of building a FORM we can bring some of these concepts toegther in an example using the text object. The following example creates a Form containing a text field. When the user clicks in the text field the ''onFocus'' event is triggered which in turn calls the ''select()'' method to highlight the text in the field(Note that since we are referencing the current object when calling the ''select()'' method we can use the ''this'' keyword to refer to the current object):
<pre>