Give ids and disable at the run-time.
HTML:
<a id="disableanchor" href="http://www.google.com">
<button id="buttononclickdisable">click here for go to yahoo</button>
</a>
Javascript:
$('#buttononclickdisable').click(function(){
$('#disableanchor').attr("disabled","disabled");
});
Or remove the 'click' event listener.
$("#anchorid").off('click');