//showImgsJs.js
// JavaScript Document
var htmlShow = ""
var imgName ="";
var numBegin,numEnd;
var colNum = 7; //一行显示的图片数量
var theCount = 12;//总共有多少图片
//文件夹里图片的名称集合
var theImgsName = "0Zero|1First|2Second|3Third|blue|green|color|7|8|9|10|11|12|13|14|15|";
var theImgs = theImgsName.split("|");
var beginHtml = "
";beginHtml += "
pictures";
beginHtml += "
";//alert(beginHtml);
document.write(beginHtml);
for(var row=0; row<=3; row++)
{
htmlShow +="
";numBegin = row * colNum + 1;
numEnd = (row+1) * colNum + 1 ;
for(var col=numBegin; col
{
imgName = "Img/" + theImgs[col] + ".jpg"
htmlShow += "
";var boolShow;
if(col <=theCount)
boolShow = "style='visibility:visible;'";
else
boolShow = "style='visibility:hidden;'";
htmlShow += "";
htmlShow += "
" + ""+ imgName + "
";
htmlShow += "
";}
htmlShow +="
";}
document.write(htmlShow);
//=======================================End
打开窗口