This can be avoided with

<a href="#" onclick="myStuff(); return false;">Click</a>
Thus the href is not considered at all.