Small error here. I have this function that displays the images from 1 -10 side by side, but it only displays the first when I use return. When I use document.write it works, but I need this function to return so I can use this in a div
var eachPicture;
function drawPicture(){
for(i=1;i<10;i++){
eachPicture = '<img src="'i +'.gif">';
return alpha;
}
}
how can I return each image in the loop without using document.write?
thanks!!
var eachPicture;
function drawPicture(){
for(i=1;i<10;i++){
eachPicture = '<img src="'i +'.gif">';
return alpha;
}
}
how can I return each image in the loop without using document.write?
thanks!!