Hallo zusammen ich habe folgenden Code
JavaScript
<script type="text/javascript">
function randomlinks(){
var myrandom=Math.round(Math.random()*9)
var links=new Array()
links[0]="http://www.thephotostories.de/giantgeorge.php"
links[1]="http://www.thephotostories.de/cashewbaum.php"
links[2]="http://www.thephotostories.de/liebesschoesser.php"
links[3]="http://www.thephotostories.de/52totekuehe.php"
links[4]="http://www.thephotostories.de/index.php"
links[5]="http://www.thephotostories.de/ueberuns.php"
links[6]="http://www.thephotostories.de/bild.php"
links[7]="http://www.thephotostories.de/impressum.php"
links[8]="http://www.thephotostories.de/origami.php"
links[9]="http://www.thephotostories.de/headbalancer.php"
window.location=links[myrandom]
}
</script>
<form>
<input type="button" value="random link!" onClick="randomlinks()">
</form>
<form>
<input type="button" value="random link!" onClick="randomlinks()">
</form>
<form>
<input type="button" value="random link!" onClick="randomlinks()">
</form>
Alles anzeigen
Das probelm ist ich möchte keinen Button haben wo Radom link steht sondern ich möchte zu den Links die passenden Namen der Seiten haben also so als würde ich z.B. Hallo schreiben und da ein link drinne ist . Ist das irgendwie möglich? Muss ich den Code dafür umschreiben?
Mit Freundlichem Gruß
Daiki