Javascript code for serial img loading
Posted
by
Surfer
on Stack Overflow
See other posts from Stack Overflow
or by Surfer
Published on 2011-01-12T14:12:40Z
Indexed on
2011/01/12
14:53 UTC
Read the original article
Hit count: 170
JavaScript
Hi everyone, I am new to javascript. I want a javascript code with which i can load an image which is named for every day/month/year. in a serial i have the following code :
var year = new Array();
year = ["08", "09", "10", "11"];
var month = new Array();
month = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JULY", "AUG", "SEP", "OCT", "NOV", "DEC"];
var date = new Array();
date = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"];
var ims = "";
for (var x in year) {
for (var y in month) {
for (var z in date) {
ims += "<im src=screencover/img/" + date[z] + "" + month[y] + "20" + year[0] + ".png>";
}
}
}
document.write(ims);
© Stack Overflow or respective owner