• GridView内的数据循环滚动


    <div id="head1"></div>
     <div id="PriceView" style="height:186px;100%;overflow-y: hidden;">
    <div id="PriceView1">
    <asp:GridView ID="grwPriceList" runat="server"  AllowSorting="True" AutoGenerateColumns="False"
        CellPadding="4" ForeColor="#333333" Width="100%"> 
        <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <Columns>
            <asp:BoundField DataField="ProductId" Visible="False" />
            <asp:BoundField DataField="ProductName" HeaderText="品名" />
             <asp:BoundField DataField="Spec" HeaderText="规格"/>
            <asp:BoundField DataField="MaxPrice" HeaderText="最高价"/>
            <asp:BoundField DataField="MinPrice" HeaderText="最低价"/>
            <asp:BoundField DataField="AvgPrice" HeaderText="均价"/>
             <asp:BoundField DataField="PriceDate" HeaderText="时间"/>
            
            
            <asp:TemplateField HeaderText="趋势">
                <ItemTemplate>
    <a href="javascript:void(window.open('ShowChart.aspx?ProductID= <%# Eval( "ProductID" )%>','', 'toolbar=no,menubar=no, scrollbars=no, resizable=no,location=no, status=no,height=450,width=840'));" target="_top" > <img alt="" style="border:0;" src="img/chart.png"  />               
                   </a> 

                </ItemTemplate>
            </asp:TemplateField>
            
            
        </Columns>
                    <RowStyle BorderColor="#EEEEEE" BorderStyle="Dotted" BorderWidth="1px"    />
                       <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White"  />
    </asp:GridView>
        </div>

    <div id="PriceView2"></div>
    </div>
     <script>
          function scrool() {
              var t = document.getElementById("<%=grwPriceList.ClientID%>");
              var t2 = t.cloneNode(true)
              for (i = t2.rows.length - 1; i > 0; i--)
                  t2.deleteRow(i)
              t.deleteRow(0)
              head1.appendChild(t2)
              ss();
          }
          window.onload = scrool
    </script>
    <script>
        function ss() {
            var speed0 = 40
            var PriceView = document.getElementById("PriceView");
            var PriceView2 = document.getElementById("PriceView2");

            var PriceView1 = document.getElementById("PriceView1");

            PriceView2.innerHTML = PriceView1.innerHTML
            function Marquee0() {
                if (PriceView2.offsetTop - PriceView.scrollTop <= 20)
                    PriceView.scrollTop -= PriceView1.offsetHeight
                else {
                    PriceView.scrollTop++
                }
            }
            var MyMar0 = setInterval(Marquee0, speed0)
            PriceView.onmouseover = function () { clearInterval(MyMar0) }
            PriceView.onmouseout = function () { MyMar0 = setInterval(Marquee0, speed0) }
        }
    </script>

  • 相关阅读:
    后缀数组板子
    上海高校金马五校赛 J
    西安电子科技大学第16届程序设计竞赛网络同步赛 G-小国的复仇
    HDU
    string 与char* char[]之间的转换 .
    (分治思想)(归并排序)C
    如何取出 Map中key和value的值
    C++ STL 中 map 容器的说明和使用技巧 .
    (经典map)A
    Babelfish(6.1.2)(sort结构体排序)(sscanf()基本使用方法)(二分法)
  • 原文地址:https://www.cnblogs.com/malcolm/p/2203406.html
Copyright © 2020-2023  润新知