Her er så Def\'s version skrevet om til det du gerne ville have:
Skriver kun linksene som rene tekststrenge...
<html>
<HEAD>
<SCRIPT LANGUAGE=\"JavaScript\">
<!-- Begin
function LinkList() {
var myheader = \"<head><title>Links In \"+document.title+\"</title></head>\";
myheader = myheader + \"<body>\";
var myfont = \"<font style=\\\"font: 8pt Verdana, Arial, Helvetica, Sans-serif; line-height:18pt;\\\" face=\\\"verdana, tahoma, geneva\\\" size=\\\"-1\\\" >\";
var mytext = \"<center></center>\";
var myendfont = \"</font>\";
var myendheader = \"</body>\";
windowprops = \"menubars=no,location=no,toolbars=no,scrollbars=yes,\"+\"width=350,height=400,top=50,left=50\";
self.name = \"main\";
if(document.all) {
for (i=0; i<document.links.length; i++) {
if(document.links[i].innerText)
if(document.links[i].innerText != \" \")
mytext += document.links[i]+\"<br>\";
else
mytext += document.links[i]+\"<br>\" ;
}
}
else {
for (i=0; i<document.links.length; i++) {
if(document.links[i].text) {
if(((document.links[i].text).indexOf(\"java script:\")) == -1) {
mytext += document.links[i]+\"<br>\" ;
}
}
else { }
}
}
linkswin = window.open(\"\",\"\",windowprops);
with (linkswin.document) {
open();
write(myheader + myfont + mytext + myendfont + myendheader);
close();
}
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<a href=\"java script:LinkList();\">List all links on this page</a><br><br>
<a href=\"
http://www.link1.com\">link1</a><br><a href=\"
http://www.link2.com\">link2</a><br><a href=\"
http://www.link3.com\">link3</a><br><a href=\"
http://www.link4.com\">link4</a><br><a href=\"
http://www.link5.com\">link5</a><br><a href=\"
http://www.link6.com\">link6</a><br><a href=\"
http://www.link7.com\">link7</a><br>/Geeeet