needing some help. I have two divs that I need to fill with images. The images can't be random as div 1's image needs to correspond to div 2's. I've been playing around and have managed to get the javascript working to this point. The problem is I need the script to write to the div backgrounds rather than fill the div with an image.
<script>
var random = Math.random();
function random_imglink(arr){
var ry = Math.floor(random*arr.length);
document.write(
'<img src="'+arr[ry]+'" border=0 class="two">'
);
}
var myimages = [
"img1.jpg", "img2.jpg","img3.jpg"
],
myimagesA = [
"img1b.jpg","img2b.jpg","img3b.jpg"];
</script>
<div><script>random_imglink(myimages);</script> </div>
<DIV><script>random_imglink(myimagesA);</script></div>