So the code that I have so far is:
&
First of all add jquery library file jquery and call it in your html head.
and then Use jquery based code...
$("#id_of_textbox").keyup(function(event){ if(event.keyCode == 13){ $("#id_of_button").click(); } });