vendredi 1 avril 2016

Random img src from array javascript

My current img source is static:

var img = new Image();
img.src = 'http://ift.tt/1N0qCqU';

How would i go about creating an array of sources and then it being picked randomly?

Creating an array is quite simple, im wondering about the random part and if theres any specifics when creating a source array




Aucun commentaire:

Enregistrer un commentaire