Determining which form element triggered by ENTER
<p>I'm trying to use jquery to detect when the ENTER key is pressed AND I need to know which form element triggered the event. I found code for detecting when the ENTER key is pressed but I can't determine the ID of the form element that triggered it.</p>

<pre><code>    $(document).keypress(function(e) {
    if( e.which == 13 )
        {
        alert( $(this) );               //This shows an object is accessible
        alert( $(this).attr("id") );    //This displays "undefined". Why? How do I determine the id of the object?
        }
    });
</code></pre>
