On 12/5/07, Minh D. Tran <[EMAIL PROTECTED]> wrote:
>
> I just have a question regarding forms. How do I set the cursor to default
> on a certain form input field?


Do you mean you want to automatically give focus to a particular form field
when the page loads? You can simply call the .focus() method on the element:

document.getElementById('myfield').focus();

Consider the accessibility implications, first, though; not everyone will be
happy to have decisions made for them about where they want their cursor to
be. ;)

- Matthew.


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to