Click to See Complete Forum and Search --> : Press enter to click a button


ztrain2100
12-25-2002, 01:44 AM
How do I select a button by pressing the Enter key? I am creating a login web page and want the user to be able to enter their name and password and then press the Enter key to perform the login.

Thanks for any help you can provide.

Zak

Rick Bull
12-26-2002, 06:49 AM
Most browsers do that for you, without any extra code:


<form action="login.php" method="post"><p>
User name: <input name="username" />
Pass-word: <input name="password" type="password" />
<input type="sumbit" />
</p></form>


If you press enter in the text-box it should submit.