Hey guys, I'm trying to make a function that will display a group of similarly named images. So far my js looks like this, the script is awful but the general idea is still present. I want the titles to display in order from 1 to 21. title1.jpg ,title2.jpg, title3.jpg , etc.
Is this even possible? or are there any better ways to accomplish this?
I've never done this before but i do know some javascript.
Thanks for all the responses in advance. You guys are geniuses.
Is this even possible? or are there any better ways to accomplish this?
I've never done this before but i do know some javascript.
Thanks for all the responses in advance. You guys are geniuses.
Code:
<script type="text/javascript">
function displayPicture()
{
var imgNum ="title"+""+".jpg"+"<br />"
var imgMax = 21
if imgNum < imgMax,imgNum++,
<img src = imgNum height="" width=''">
}
</script>
Comment