Wednesday, December 26, 2007

How do I set the focus to the first form field?

You cannot do this with HTML. However, you can include a script after the form that sets the focus to the appropriate field, like this:

A similar approach uses to set the focus, but some browsers seem to process the ONLOAD event before the entire document (i.e., the part with the form) has been loaded.

0 comments: