Click the button to select the contents of the text field.
The select() method of the HTML DOM Input Text Object selects the contents of the text field. When this happens, the onselect event fires, which will trigger the alert function.