I want to keep the normal form when I press Enter, because the users are familiar. But in reflection, they often press the enter button when they finish with an input text box, but before they are completed with the full form.
I would like to capture the Enter key only when the focus is on a particular input class.
Finding Questions Related , Similar to what I'm looking for:
if (document.addEventListener) { document.getElementById('strip').addEventListener('keypress',HandleKeyPress,false); } else { document.getElementById('strip').onkeypress = HandleKeyPress; }
but the if (document.addEventListener) { is unfamiliar to me.
jquery webforms
justSteve May 08 '10 at 12:21 2010-05-08 12:21
source share