日期:2014-05-16  浏览次数:20416 次

现在搜索一些脚本越来越困难了,我要实现一个自动循环显示表格的每一行的jquery代码也找不到。
JScript code

                <table id="sItem"  style="width: 230px;height: 140px; margin-right: auto; margin-left: auto;">
                    <asp:Repeater ID="JxtdRepeater2" runat="server">
                    <ItemTemplate>
                    <tr style="height: 125px">
                        <td colspan="2">
                            <table cellpadding="0" cellspacing="0" style="width: 100%">
                                <tr>
                                    <td style="width: 100px" align="center" ><img src=<%# Eval("Item3")%> height="120" width="84" /></td>
                                    <td style="line-height: 150%"  ></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    </ItemTemplate>
                    </asp:Repeater>
                </table>



从数据库取得的数据,在同一个地方循环显示。

------解决方案--------------------
啥米意思?
数据库数据打印到table里?这个应该是asp做的事情。
还是页面上的table里已经有若干数据,需要用jquery循环,把每个td里的读取出来?
------解决方案--------------------
网上搜superMarquee
一个jQuery插件,很好用的。
------解决方案--------------------
LZ 什么情况 自问 自答
------解决方案--------------------
<ul id=”twitter”>
<li>第一条消息</li>
<li>第二条消息</li>
<li>第三条消息</li>
</ul>

$(document).ready(function(){
$(“#twitter li:not(:first)”).css(“display”,”none”);
var B=$(“#twitter li:last”);
var C=$(“#twitter li:first”);
setInterval(function(){
if(B.is(“:visible”)){
C.fadeIn(500).addClass(“in”);B.hide()
}else{
$(“#twitter li:visible”).addClass(“in”);
$(“#twitter li.in”).next().fadeIn(500);
$(“li.in”).hide().removeClass(“in”)}
},3000) //每3秒钟切换一条,你可以根据需要更改
})
------解决方案--------------------
给个建议,先把数据库里的数据读出来,存进一个json数组里,然后用jquery分个读取。