<p>I've been making a concerted effort to improve my javascript skills lately by reading as much javascript code as I can. In doing this I've sometimes seen the <code>javascript:</code> prefix appended to the front of event handler attributes in HTML element tags. What's the purpose of this prefix? Basically, is there any appreciable difference between:</p>

<pre><code>onchange="javascript: myFunction(this)"
</code></pre>

<p>and</p>

<pre><code>onchange="myFunction(this)"
</code></pre>

<p>?</p>

Probably nothing in your example. My understanding is that
```
javascript:
```
is for anchor tags (in place of an actual
```
href
```
). You'd use it so that your script can execute when the user clicks the link, but without initiating a navigation back to the page (which a blank
```
href
```
coupled with an
```
onclick
```
will do).
For example:
```
```
<a href="javascript:someFunction();">Blah</a>
```
```
Rather than:
```
```
<a href="" onclick="someFunction();">Blah</a>
```
```