图片文字上下滚动js
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<script type="text/javascript">
var speed=60;
link_logo2.innerHTML= link_logo1.innerHTML
function Marquee2(){
if( link_logo2.offsetTop-link_logo.scrollTop<=0){
link_logo.scrollTop-=link_logo1.offsetHeight;;
}
else { link_logo.scrollTop+=1;
}
}
var MyMar2=setInterval(Marquee2,speed)
link_logo.onmouseover=function() {clearInterval(MyMar2)}
link_logo.onmouseout=function() {MyMar2=setInterval(Marquee2,speed)}
</script>
var speed=60;
link_logo2.innerHTML= link_logo1.innerHTML
function Marquee2(){
if( link_logo2.offsetTop-link_logo.scrollTop<=0){
link_logo.scrollTop-=link_logo1.offsetHeight;;
}
else { link_logo.scrollTop+=1;
}
}
var MyMar2=setInterval(Marquee2,speed)
link_logo.onmouseover=function() {clearInterval(MyMar2)}
link_logo.onmouseout=function() {MyMar2=setInterval(Marquee2,speed)}
</script>
js代码要放在body里,显示块后面
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td align="center"> <div id="link_logo" style=" overflow: hidden; width: 100%; height: 293px">
<div id="link_logo1" style="overflow: hidden;">
<asp:DataList ID="cplist" runat="server" RepeatColumns="2">
<ItemTemplate>
<table width="120" height="120" border="0" cellpadding="1" cellspacing="1" bgcolor="#dddddd">
<tr>
<td bgcolor="#FFFFFF" valign="middle" align="center"><a target="_blank" href="http://nbrands.reworlds.com/<%#Eval("enname")%>/gallery/?cid=<%#Eval("cid") %>&pid=<%#Eval("id") %>"> <img src="productImg/<%#Eval("imgurl") %>" border="0" onload="DrawImage(this,118,118)" width="118" height="118"></a></td>
</tr>
</table>
<table width="120" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center" class="hei12"><a href="http://nbrands.reworlds.com/<%#Eval("enname")%>/gallery/?cid=<%#Eval("cid") %>&pid=<%#Eval("id") %>"><%#Eval("name") %></a></td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
</div>
<div id="link_logo2"></div></div>
</td>
</tr>
</table>
<tr>
<td align="center"> <div id="link_logo" style=" overflow: hidden; width: 100%; height: 293px">
<div id="link_logo1" style="overflow: hidden;">
<asp:DataList ID="cplist" runat="server" RepeatColumns="2">
<ItemTemplate>
<table width="120" height="120" border="0" cellpadding="1" cellspacing="1" bgcolor="#dddddd">
<tr>
<td bgcolor="#FFFFFF" valign="middle" align="center"><a target="_blank" href="http://nbrands.reworlds.com/<%#Eval("enname")%>/gallery/?cid=<%#Eval("cid") %>&pid=<%#Eval("id") %>"> <img src="productImg/<%#Eval("imgurl") %>" border="0" onload="DrawImage(this,118,118)" width="118" height="118"></a></td>
</tr>
</table>
<table width="120" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center" class="hei12"><a href="http://nbrands.reworlds.com/<%#Eval("enname")%>/gallery/?cid=<%#Eval("cid") %>&pid=<%#Eval("id") %>"><%#Eval("name") %></a></td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
</div>
<div id="link_logo2"></div></div>
</td>
</tr>
</table>