Yes. Thanks papa.
Now, I am trying to store variables depending on the value of i, x times. x amount of variables.
Code: Select all
<span id='istart'></span>
<span id='istartb'></span>
<script type="text/javascript">
var i_list = '';
var cac = '5';
var pich = '.png';
for (var i=0;i<=cac;i++)
{
i_listb = i + '' + pich +'';
i_list += i + '' + pich +'';
}
var lala = i_list;
var lalab = i_listb;
document.getElementById("istart").innerHTML = lala;
document.getElementById("istartb").innerHTML = lalab;
</script>
I am trying to do a slide show in which I can set the number of images there will be displayed in variable cac.
I would want to store x amount of variables depending cac's value.
gives me all numbers sequentially.
while code:
outputs the last number.
Now, how could I get each number as a var?
var1, var2, and so on.