我已经发过了 再来一边(重复发贴)
点击察看测试 <%sub pic(id) sql="select * from tv where pdao="&id rs.open sql,conn,1,1 num=rs.recordcount dim pic(5,2) for i=0 to num-1 pic(i,0)=rs("img") pic(i,1)=rs("link") pic(i,2)=rs("title") rs.movenext next rs.close%> <script language=JavaScript> <!-- var imgUrl=new Array(); var imgLink=new Array(); var tex=new Array(); var adNum=0; <%for i=1 to num%> imgUrl[<%=i%>]="<%=pic(i-1,0)%>"; imgLink[<%=i%>]="<%=pic(i-1,1)%>"; tex[<%=i%>]="<%=pic(i-1,2)%>"; <%next%> var imgPre=new Array(); var j=0; for (i=1;i<=<%=num%>;i++) { if( (imgUrl[i]!="") && (imgLink[i]!="") ) { j++; } else { break; } }
function playTran(){ if (document.all){ document.imgInit.filters[0].play(); } }
function nextAd(){ if(adNum<j)adNum++ ; else adNum=1; if (document.all){ document.imgInit.filters[0].Transition=26; document.imgInit.filters[0].apply(); } document.images.imgInit.src=imgUrl[adNum]; imgInit.title=(tex[adNum]); myou.innerHTML=(tex[adNum]); playTran(); theTimer=setTimeout("nextAd()", 6000); }
function goUrl(){ jumpUrl=imgLink[adNum]; jumpTarget='_blank'; if (jumpUrl != ''){ if (jumpTarget != '') window.open(jumpUrl,jumpTarget); else location.href=jumpUrl; } } --> </script> <%end sub%> 调用 <%pic(1)%> <table width="100%" border="5" align="center" cellpadding=0 cellspacing=0 bordercolorlight="#73B300" bordercolordark="#C5FF59" bgcolor="#73B300"> <tr> <td align=middle height=191> <table cellpadding=0 cellspacing=0 border=0 align=center> <tr> <td height="191" align="center" bgcolor="#000000"><a href="javascript:goUrl()"><img src="javascript:nextAd()" alt=盖州特产 name=imgInit width=240 height=190 border=0 style="FILTER: revealTrans(duration=2,transition=120);border-color:white;color:#ffffff"></a></td> </tr> </table></td> </tr> <tr> <td height="2" bgcolor="#666666" align="center"></td> </tr> <tr> <td height=30 align="center" bgcolor="#609300"><a href="goUrl()"> <strong><font color="#FFFFFF"> <div id="myou" align="center"></div> </font></strong> </a></td> </tr> </table>