<html>
<script>
function explode() {
pp = document.getElementsByTagName("a");
var a='';
for(i=0;i<pp.length;i++) {
a+=pp[i].href
}
document.write(a);
}
</script>
<body>
<a >Google</a>
<a >Yahoo</a>
<button onclick="explode()">Explode</button>
<body>
</html>