I came op with a java script like this.
<script>
function pickimg2() {
var imagenumber = 19;
var randomnumber = Math.random();
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1;
images = new Array;
images[0] = "2_of_clubs.png";
images[1] = "2_of_diamonds.png";
images[2] = "2_of_hearts.png";
images[3] = "2_of_spades.png";
images[4] = "3_of_clubs.png";
images[5] = "3_of_diamonds.png";
images[6] = "3_of_hearts.png";
images[7] = "3_of_spades.png";
images[8] = "4_of_clubs.png";
images[9] = "4_of_diamonds.png";
images[10] = "4_of_hearts.png";
images[11] = "4_of_spades.png";
images[12] = "5_of_clubs.png";
images[13] = "5_of_diamonds.png";
images[14] = "5_of_hearts.png";
images[15] = "5_of_spades.png";
images[16] = "6_of_clubs.png";
images[17] = "6_of_diamonds.png";
images[18] = "6_of_hearts.png";
images[19] = "6_of_spades.png";
images[20] = "6_of_clubs.png";
images[21] = "6_of_diamonds.png";
images[22] = "6_of_hearts.png";
images[23] = "6_of_spades.png";
var image = images[rand1];
document.randimg.src = image;
}
For a live demo
https://jsfiddle.net/0d2u525x/
Then i tried to use this HTML code.
<body onload="pickimg2">
<a href=""onClick="pickimg();return false;"><img src="BicycleBlue.jpg" name="randimg" border=0></a>
<input id="clickMe" type="button" value="clickme" onclick="doFunction();">
</input>
</body>
https://jsfiddle.net/0d2u525x/
How could i make this work, this is supposed to work with a full card set consisting of 67 cards, so if you could help me out, with the code, so that it is set to taht imagenumber, it would be a hughe help, i am ofcourse going to add the last images my self. ?