You are here: Re: set focus to .... « HTML « IT news, forums, messages
Re: set focus to ....

Posted by Kim Andr� Aker� on 02/27/06 19:57

Aaron wrote:

> I need to set focus to a input text field on a simple form at onLoad.

This might work:

<body onload="document.getElementByName('textfieldname').focus()">

Then, later in the HTML document:

<form ...>
<input type="text" name="textfieldname">
</form>

Please note that this will only work in browsers that have JavaScript
enabled.

--
Kim André Akerø
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация