using preventDefault in onclick doesn't work
<p>Can anyone tell me why the code below doesn't seem to prevent the link from doing its thing?  I know I can just use <code>onclick="return false"</code>, but it should work with preventDefault, right?  I tried <code>onclick="function(e){this.preventDefault()}"</code> and <code>onclick="this.preventDefault()"</code>, but no love.</p>

<pre><code>&lt;!doctype html&gt;  
&lt;html lang="en"&gt;  
    &lt;head&gt;  
        &lt;meta charset="utf-8"&gt;  
        &lt;title&gt;Test&lt;/title&gt;  
    &lt;/head&gt;  
    &lt;body&gt; 
        &lt;a href="http://www.google.com" onclick="function(e){e.preventDefault()}"&gt;Google Search&lt;/a&gt;
    &lt;/body&gt;  
&lt;/html&gt;
</code></pre>
