主题:[原创]这段代码应该怎么样最快的去理解了??~
SCRIPT>
var roll_image = new Array;
var image_link = new Array ;
var small_img = new Array;
roll_image[0] = http://www.to8to.com/designer/v-1s108;
image_link[0] = http://www.to8to.com/designer/v-1s190;
small_img[0] =http://www.to8to.com/designer/v-1s272;
roll_image[1] = http://www.to8to.com/designer/v-1s282;
image_link[1] =http://www.to8to.com/designer/v-1s368;
small_img[1] = http://www.to8to.com/designer/v-2s653;
roll_image[2] = 'images/03.jpg';
image_link[2] = 'http://www.68design.net/';
small_img[2] = http://www.to8to.com/designer/v-2s662;
roll_image[3] = 'images/04.jpg';
image_link[3] = 'http://www.68design.net/';
small_img[3] = http://www.to8to.com/designer/v-2s654;
roll_image[4] = 'images/05.jpg';
image_link[4] = 'http://www.68design.net/';
small_img[4] = http://www.to8to.com/designer/v-2s314;
roll_image[5] = 'images/06.jpg';
image_link[5] = 'http://www.68design.net/';
small_img[5] = http://www.to8to.com/designer/v-1s382;
roll_image[6] = 'images/07.jpg';
image_link[6] = 'http://www.68design.net/';
small_img[6] = http://www.to8to.com/designer/v-2s138;
var cliImg = '';
var cliImgSrc = '';
var imgNo = Math.round(Math.random() * 7);
var interval = 3000;
var setTime = '';
function click_simg(ci, no){
var pImg = document.all.bigimg;
var pLink = document.all.imglink;
if(cliImg == '') {
cliImg = ci;
cliImgSrc = ci.src;
ci.src = small_img[no];
imgNo=no;
pImg.src =roll_image[no];
pLink.href = image_link[no];
} else if(cliImg != ci) {
cliImg.src = cliImgSrc;
cliImg = ci;
cliImgSrc = ci.src;
ci.src = small_img[no];
imgNo=no;
pImg.src =roll_image[no];
pLink.href = image_link[no];
}
clearTimeout(setTime);
setTime=setTimeout("rotate()",interval);
}
function rotate(){
imgNo = (imgNo >= 6) ? 0 : imgNo+1;
var ci = eval('document.all.num_img'+imgNo);
document.all.bigimg.filters.blendTrans.apply();
document.all.imglink.href=image_link[imgNo];
document.all.bigimg.src=roll_image[imgNo];
document.all.bigimg.filters.blendTrans.play();
if(cliImg == '') {
cliImg = ci;
cliImgSrc = ci.src;
ci.src = small_img[imgNo];
} else if(cliImg != ci) {
cliImg.src = cliImgSrc;
cliImg = ci;
cliImgSrc = ci.src;
ci.src = small_img[imgNo];
}
setTime=setTimeout("rotate()",interval);
}
//-->
</SCRIPT>