How to clear a textbox onfocus?
<p>I've tried this but it doesn't work:</p>

<pre><code>$(function() {
    $('input[type=text]').focus(function() {
      $(this).val() == '';
      });
 });
</code></pre>
