Hi,
Try this it can helps you
<a href="Default3.aspx" id="getidlink" onclick="return getlink()">clickhere</a>
And javascript contains following method
function getlink() {
alert(document.getElementById("getidlink").href);
return false;
}
All the Best