gpt4 book ai didi

ASP.NET中利用DataList实现图片无缝滚动 实例分享

转载 作者:qq735679552 更新时间:2022-09-29 22:32:09 25 4
gpt4 key购买 nike

CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.

这篇CFSDN的博客文章ASP.NET中利用DataList实现图片无缝滚动 实例分享由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.

[html] 。

复制代码代码如下

<div id="demo" style="overflow: hidden; width: 441px; border: 0px">          <table width="441" height="130" border="0" cellpadding="0" cellspacing="0" background="Images/img2/32.jpg">              <tr>                  <td align="center" id="demo1" valign="bottom">                      <asp:DataList ID="DataList1" runat="server" RepeatDirection="Horizontal" DataSourceID="ObjectDataSource1">                          <ItemTemplate>                              <table>                                  <tr>                                      <td>                                          <asp:ImageButton ID="imgbtnInfo" runat="server" ImageUrl='<%#Eval("Spic") %>' OnClick="imgbtnInfo_Click"                                              CommandArgument='<%#Eval("ID") %>' />                                      </td>                                  </tr>                                  <tr>                                      <td align="center">                                          <asp:LinkButton ID="lkbtnInfo" CommandArgument='<%#Eval("ID") %>' runat="server"                                              OnClick="lkbtnInfo_Click" CssClass="bb" Text='<%#Eval("Type") %>'></asp:LinkButton>                                      </td>                                  </tr>                              </table>                          </ItemTemplate>                      </asp:DataList>                      <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="SelectInfo"                          TypeName="HotelDAL.KeFangServices"></asp:ObjectDataSource>                  </td>                  <%-- 这一步很重要 --%>                  <td id="demo2" align="center" valign="bottom">                  </td>              </tr>          </table>      </div>      <script>          //滚动的速度,数值越大速度越慢          var speed = 20          demo2.innerHTML = demo1.innerHTML          //从右至左           function Marquee() {              if (demo1.offsetWidth - demo.scrollLeft <= 0)                  demo.scrollLeft = 0              else                  demo.scrollLeft++          }  www.zzvips.com         var MyMar = setInterval(Marquee, speed)          demo.onmouseover = function () { clearInterval(MyMar) }          demo.onmouseout = function () { MyMar = setInterval(Marquee, speed) }       </script>  。

最后此篇关于ASP.NET中利用DataList实现图片无缝滚动 实例分享的文章就讲到这里了,如果你想了解更多关于ASP.NET中利用DataList实现图片无缝滚动 实例分享的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com