<script type="text/javascript">
function getObj(name){
return document.getElementById(name);
}
function chclickimg(obj,k){ // 對(duì)象obj,對(duì)象序號(hào)k
obj.onmouseover=function(){
var tmp;
for (c=0;c<lis.length;c++){
if (c==k){
str = topTabArray[c].split('||');
getObj('top_trun_image_src').src = str[0];
lis[c].className="new_show_on"
key=c;
}
else {
lis[c].className="new_show_off"
}
}
var obj=document.getElementById("img_area");
obj.filters.alpha.opacity = tou_ming_chu_zhi;
var interObj = setInterval(function(){
obj.filters.alpha.opacity+=5;
if(obj.filters.alpha.opacity=100){clearInterval(interObj);}
},100);
}
}
var tou_ming_chu_zhi=0;//設(shè)置透明初值
var bian_hua_su_du=8;
var topTabArray = new Array();//組織數(shù)據(jù)------- topTabArray[0] = "圖片地址||連接";
topTabArray[0] = " images/1.jpg||#";
topTabArray[1] = " images/2.jpg||#";
topTabArray[2] = " images/3.jpg||#";
var key = 1;//記錄當(dāng)前的位置
var selects = getObj('select_num');
var lis = selects.getElementsByTagName('li');
for (var i=0;i<lis.length;i++){//綁定事件處理函數(shù)
chclickimg(lis[i],i);
}
lis[0].onmouseover();
</script>
更多信息請(qǐng)查看IT技術(shù)專(zhuān)欄