Using jQuery, is it true that we can catch the submit button's event either by "click" or "submit"?
<p>In jQuery, for a form submit button or image, it seems that we can use either</p>

<pre><code>    $('#search-box-submit').click(function() {
      if ($('#search-box-submit').val().match(/^\s*$/)) {
        alert("Please enter search keywords");
        return false;  // stop the search request
      }
    });
</code></pre>

<p>or we can use <code>submit</code>:</p>

<pre><code>    $('#search-box-submit').submit(function() {
      if ($('#search-box-submit').val().match(/^\s*$/)) {
        alert("Please enter search keywords");
        return false;  // stop the search request
      }
    });
</code></pre>

<p><strong>update:</strong> actually, <code>click</code> works to prevent an empty keyword being used for searching, but <code>submit</code> doesn't prevent that.  Why is that?</p>

<p><strong>update 2:</strong> I am so surprised that in Firefox or Chrome, defining the <code>click</code> handler actually works for pressing <kbd>Enter</kbd> with nothing entered as well.  So looks like Firefox and Chrome build that intelligence in.  If I use IE 8, then it will go ahead and search with empty string (request to server)</p>
