title: Do you ever need to specify 'javascript:' in an onclick?
body: <p>AFAIK, you never need to specify the protocol in an onclick:</p>
  
  <p><code>onclick="javascript:myFunction()"</code> <strong>Bad</strong></p>
  
  <p><code>onclick="myFunction()"</code> <strong>Good</strong></p>
  
  <p>Today I noticed in <a href="http://web.archive.org/web/20080428095515/http://www.google.com/support/analytics/bin/answer.py?answer=55527" rel="noreferrer">this article</a> on Google Anallytics that <em>they</em> are using it:</p>
  
  <pre><code>&lt;a href="http://www.example.com" onClick="javascript: pageTracker._trackPageview('/outgoing/example.com');"&gt;
  </code></pre>
  
  <p>Is this example just plain wrong, or is there ever a reason to specify <code>javascript:</code> in anything other than a <code>href</code>?</p>