Assuming that the button is of type="submit" then this is a standard event.
If you had more than one form on your page the 'focus' will appear on the
submit button associated with that form. Although it is not really a focus as
such because your focus is actually on the textbox. This allows you to press
enter whilst in the textbox to submit the form.
If you want to avoid that then you could use type="button" instead, but you
will need to created an onClick function to submit the form.
Assuming that the button is of type="submit" then this is a standard event.
If you had more than one form on your page the 'focus' will appear on the
submit button associated with that form. Although it is not really a focus as
such because your focus is actually on the textbox. This allows you to press
enter whilst in the textbox to submit the form.
If you want to avoid that then you could use type="button" instead, but you
will need to created an onClick function to submit the form.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.