'how to loop images by names and numbers?
<div>
<a><img src="../photos/vacances01.jpg"></a>
</div>
<div>
<a><img src="../photos/vacances02.jpg"></a>
</div>
i would like to create a loop to read all the images in the file called vacances01, vacances02... and famille01, famille02...
with for exemple the possibility to defina a part the word "vacances", or "famille", or "cars"....
like i specify a word which go after '../photos/' then it loops the numbers with 'i++' and it write at the end '.jpg'
and it generate that in loops :
<div>
<a><img src="../photos/vacances01.jpg"></a>
</div>
...
do you understand me ? thank you in advance, my level is not very high
Solution 1:[1]
First of you have to understand that HTML is not a programming language in the way you think it is. HTML is, as the name suggests, a markup lanuage, used for designing websites. The "i++" is used in languages like C++ and Java. JavaScript could be used for such a task. How, I do not know.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jack |
