1//submit form when 'Enter' key is pressed while in myInputID
2document.getElementById("myInputID").addEventListener("keyup", function(event) {
3 if (event.keyCode === 13) {
4 document.getElementById("myFormID").submit();
5 return false;
6 }
7});