oppure, se la funzione è richiamata onclick sul link, aggiungi ;return false
<a href="#" onclick="funzione();return false">...
ciao