Best way to set a default button (or trigger its event in javascript) for an input field, not part of a form
- by Sheldon Pinkman
I've got a stand-alone input field, not part of any form.
I also got a button, that has some onclick event.
When I type something in the input field, and press the Enter key, I want it do effectively press the button, or trigger its onclick event. So that the button is "the input field's default button" so to speak.
<input id='myText'…