How can I activate a button in an HTML form on pressing Enter?

Cifru

New member
The form I am currently working on contains a number of buttons. Two of the buttons contain other JavaScripts. I have also a text box, and I would like to as the user presses enter it will activate one specific html button from the two of them. How can this be done. My html code is as follows:

<form action="" method="post" name="myform" style="text-align: center;">
<label for="code">Reference Number: </label>
<input id="code" name="code" type="text" />
<input name="redirect" type="hidden" value="" />
<input name="submitButton" id="submitbutton" onclick="redirectURL();" type="button" value="Go" />
<input name="Reset" type="reset" value="Reset" />
</form>

Can I use a javascript? What is the Javascript code please? Thanks in advance
@Cherry Lane Design - Thanks for your help but it will not make my other javascript work.
 
Back
Top