Syntax
<input onFocus="....">

This is an event which causes a script (e.g. JavaScript) to execute when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: A, AREA, LABEL, INPUT, SELECT, TEXTAREA, and BUTTON.

An example of this would be:
<input onFocus='javascript:alert("The input box has gained focus");' value="eluk - the best CSS help file in the world!!!!"> <b>Now click in this box</b>

would produce:

Now click in this box