动态图片轮流播而且点击图片时连接到一个新闻地址

<DIV id="icefable2" align="center"><asp:datalist id="DataListPic" runat="server" Width="772px" ShowHeader="False" Height="125px"
            RepeatDirection="Horizontal" ShowFooter="False">
            <SelectedItemTemplate>
             <FONT face="宋体"></FONT>
            </SelectedItemTemplate>
            <ItemTemplate>
             <TABLE id="Table17" height="110" cellSpacing="0" cellPadding="0" width="133" border="0">
              <TR>
               <TD width="160"><FONT face="宋体">
                 <asp:ImageButton id=ImageButton1 οnclick=OnPicList_Click runat="server" Width="133px" ImageUrl='<%# ((DataRowView)Container.DataItem)["pic"]%>' Height="100px" CommandArgument='<%# ((DataRowView)Container.DataItem)["id"]%>' AlternateText='<%# ((DataRowView)Container.DataItem)["title"]%>'>
                 </asp:ImageButton></FONT></TD>
               <TD width="10"><FONT face="宋体"></FONT></TD>
              </TR>
              <TR>
               <TD>
                <asp:HyperLink id=messageLink Runat="server" NavigateUrl='<%# "Article.aspx?id="+((DataRowView)Container.DataItem)["id"]%>' title='<%# ((DataRowView)Container.DataItem)["title"]%>' text='<%# mySubString(((DataRowView)Container.DataItem)["title"].ToString(),8)%>'>
                </asp:HyperLink></TD>
              </TR>
             </TABLE>
            </ItemTemplate>
           </asp:datalist></DIV>

<SCRIPT language="javascript">
<!--
marqueesHeight=760;
stopscroll=false;
with(icefable2){
   style.width=marqueesHeight;
   style.height=110;
   style.overflowX='hidden';
   style.overflowY='visible';
   noWrap=true;
   οnmοuseοver=new Function('stopscroll=true');
   οnmοuseοut=new Function('stopscroll=false');
  }
  preTop=0; currentLeft=100; stoptime=0;
function init_srolltext(){
  icefable2.scrollLeft=0;
  setInterval('scrollUp()',40);//滚动速度
}init_srolltext();

function scrollUp(){
  if(stopscroll==true) return;
  currentLeft+=1;
  if(currentLeft==91)     //滚动距离
  {
   stoptime+=1;
   currentLeft-=1;
   if(stoptime==91) //滚动间距
   {
    currentLeft=0;
    stoptime=0;    
   }
  }

  else {   
   preTop=icefable2.scrollLeft;
   icefable2.scrollLeft+=1;
   if(preTop==icefable2.scrollLeft){
     icefable2.scrollLeft=0;
     icefable2.scrollLeft+=1;
   }
  }
 
}

-->
</SCRIPT>

div 里面放的是个datagrid控件,在控件里面帮定图片数据
用javascrip是图片滚动播放,不知道里需要的是不是这个意思

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值