Make an anchor acts as a submit button. Not just using click event
<p>Something like this will works only when user clicks the anchor. But a form also is submitted when user push [enter] key inside the form. How could I have the same functionality using just an anchor?</p>

<pre><code>    $('a.submit').click(function() {
    $(this).closest('form').submit();
}); 
</code></pre>

<p>Thanks.-</p>

<p>EDIT (with solution):</p>

<p>This combination works (at least) in FF and chrome! either clicking the anchor with class <em>submit</em> or pressing [enter].</p>

<pre><code>    $('#my_form a.submit').click(function(e) {
    e.preventDefault();
    $(this).closest('form').submit();
}); 

$('#my_form').keydown(function(e) {
    if (e.keyCode != 13)
        return;
    $(this).submit();
}); 
</code></pre>

<p>Thanks for your comments!</p>
