<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 href="http://google.com">Google</a>
<a href="http://yahoo.com">Yahoo</a>
<button onclick="explode()">Explode</button>
<body>
</html>