Virtual Brain Online Logo

Bookmark: \ Webdesign \ Autofocus on page load

Autofocus on page load


Last Updated:

Provide Field Focus
This easy "nice-to-have" puts the cursor directly into the first input field (first_name) when the form is displayed. Use the BODY onLoad event, you can save your visitors a click of the mouse:

<BODY onLoad="document.forms[0].first_name.focus();">

Source: http://www.sitepoint.com/article/steps-useable-forms
Originally Posted by Skylinux @ 2006-07-23 10:24:54

 

No Comments yet .....

 

Add Your Comment:

Note: All posts require administrator approval. Please allow 24 hours for message approval.

Name:
E-Mail:
Title
Plain text only, less then 65 000 characters.

How many apples does Peter have left if Peter has 25 apples but little Jane eats one of his apples?

Please answer the question above and type the answer into the text box below.