I have an HTML form with a single submit input, but also various button elements. When the user presses the \'enter\' key, I\'d expect it to actually s
Try this, if enter key was pressed you can capture it like this for example, I developed an answer the other day html button specify selected, see if this helps.
Specify the forms name as for example yourFormName then you should be able to submit the form without having focus on the form.
document.onkeypress = keyPress;
function keyPress(e){
var x = e || window.event;
var key = (x.keyCode || x.which);
if(key == 13 || key == 3){
// myFunc1();
document.yourFormName.submit();
}
}