<script>
function showfiles(folderspec)
{
var fso,f,fc,s,i,j,re;
var t="";
fso=new ActiveXObject("Scripting.FileSystemObject");
f=fso.GetFolder(folderspec);
fc=new Enumerator(f.files);
s="";
i=1;
document.write("<body οnscrοll=i1.style.top=window.document.body.scrollTop+10;i1.style.left=window.document.body.clientWidth-i1.clientWidth-20>");
for (;!fc.atEnd();fc.moveNext())
{
s=fc.item();
var s=new String(s);
re=s.length;
j=s.substring((re-3),re);
if ((j=="jpg")|(j=="gif")|(j=="bmp")|(j=="JPG")|(j=="GIF")|(j=="BMP")){
document.write("<span id=s"+i+" οnmοuseοver=i1.src=this.innerHTML;i1.style.left=window.document.body.clientWidth-i1.clientWidth-20>"+s+"</span><br>");}
i++;
}
document.write("<img id=i1 src=''style='position:absolute;top:10px;left:600px;background-color:gray'>");
}
function showpath()
{
var fso,f,s;
fso=new ActiveXObject("Scripting.FileSystemObject");
f= fso.GetFolder("image"); //保证当前目录下有个包含图片的image文件夹
s=f.path;
return(s);
}
</script>
<body οnlοad=showfiles(showpath())>
</body>