一个很好的自动切换效果。数目可以加n 多
<DIV id=focus_pic> <!--get hot_silde_swf pic--> <DIV id=focusPic1> [ecmsinfo]'selfinfo','0,1',30,0,0,20,1[/ecmsinfo] <DIV id=index_page><STRONG>1</STRONG> <A href="javascript:setFocus(2);">2</A> <A href="javascript:setFocus(3);">3</A> <A href="javascript:setFocus(4);">4</A> </DIV></DIV>
<DIV id=focusPic2 style="DISPLAY: none"> [ecmsinfo]'selfinfo','1,2',30,0,0,20,1[/ecmsinfo] <DIV id=index_page> <A href="javascript:setFocus(1);">1</A> <STRONG>2</STRONG> <A href="javascript:setFocus(3);">3</A> <A href="javascript:setFocus(4);">4</A> </DIV></DIV>
<DIV id=focusPic3 style="DISPLAY: none"> [ecmsinfo]'selfinfo','2,3',30,0,0,20,1[/ecmsinfo] <DIV id=index_page> <A href="javascript:setFocus(1);">1</A> <A href="javascript:setFocus(2);">2</A> <STRONG>3</STRONG> <A href="javascript:setFocus(4);">4</A> </DIV></DIV>
<DIV id=focusPic4 style="DISPLAY: none"> [ecmsinfo]'selfinfo','3,4',30,0,0,20,1[/ecmsinfo] <DIV id=index_page> <A href="javascript:setFocus(1);">1</A> <A href="javascript:setFocus(2);">2</A> <A href="javascript:setFocus(3);">3</A> <STRONG>4</STRONG> </DIV></DIV> <!--!get hot_silde_swf pic--> </DIV> <SCRIPT language=javascript type=text/javascript> //<![CDATA[ var _t1 = 0; //打开页面时等待图片载入的时间,单位为秒,可以设置为0 var _t2 = 5; //图片轮转的间隔时间 var _tnum = 4; //焦点图个数 var _tn = 1;//当前焦点 var _tl =null; _tt1 = setTimeout('change_img()',_t1*500); function change_img(){ setFocus(_tn); _tt1 = setTimeout('change_img()',_t2*500); } function setFocus(i){ if(i>_tnum){_tn=1;i=1;} _tl?document.getElementById('focusPic'+_tl).style.display='none':''; document.getElementById('focusPic'+i).style.display='block'; _tl=i; _tn++; } //]]> </SCRIPT>
|