link(){
var olink = getElementById("link");
var text = olink.innerHTML;
var start = text.indexOf(">")+1;
var end = text.lastIndexOf("<");
text = text.substring(start,end);
location.href=text;
}
<a href="java:void(0)" ="link()">maito:[email protected]</a>