i have a script that outputs 4 random images from a folder:
var imagenumber = 9 ;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;
var randomnumber2 = Math.random() ;
var rand2 = Math.round( (imagenumber-1) * randomnumber2) + 1 ;
var randomnumber3 = Math.random() ;
var rand3 = Math.round( (imagenumber-1) * randomnumber3) + 1 ;
var randomnumber4 = Math.random() ;
var rand4 = Math.round( (imagenumber-1) * randomnumber4) + 1 ;
the 4 random images generated are inserted into 4 seperate divs (<div id=“highlight_1”><div id=“highlight_2”><div id=“highlight_3”><div id=“highlight_4”>.
the question i have is, how can you make the output have each of the 4 images different from each other (no repeats on the page)? i always get duplicate random numbers. any ideas?