Why not use:
<a href="javascript:myJsFunc()">Run JavaScript Code</a>
Or am I missing a downfall with this method? I know its an old post but still people are looking for this.