c#.net 动态读取 走马灯代码实例分享

前台html及js脚本:

[html]

复制代码 代码如下:


<div>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <td bgcolor="#CC66FF" 
               >
            </td>
        </tr>
        <tr>
            <td>
                <table cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <div>
                                <div 
                                   >
                                    <table cellpadding="0" cellspace="0" cellspacing="0" 
                                       >
                                        <tr>
                                            <td valign="top">
                                                <table cellpadding="0" cellspacing="0">
                                                    <tr> <asp:Label runat="server" Text="Label"></asp:Label>
                                                        </tr>

                                                </table>
                                            </td>
                                            <td valign="top">
                                            </td>
                                        </tr>
                                    </table>
                                </div>
<SCRIPT __designer:dtid="3377854339350821">
var speed3=1//速度数值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed3)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed3)}
</SCRIPT>
                                </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
            </td>
        </tr>
    </table>
</div>


 

cs页的代码:

[csharp]

复制代码 代码如下:


dal_Collection dc = new dal_Collection();
Label1.Text = dc.GetIndexZouMaDeng();
 

dal_Collection.GetIndexZouMaDeng()的代码:


[csharp]

复制代码 代码如下:


using System.Text;

[csharp]

复制代码 代码如下:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjgfjp.html