给你一个带换链接和文字说明的 哪项不要自己改
[URL=http://ly.gaizhou-window.com]点击察看测试[/URL]
<%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%>
调用
<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>
大哥,你的代码有问题呀!还有你的数据库表的结构是什么?
/mename.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www./mename.gif');}" onmousewheel="return imgzoom(this);" alt="" />