<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>
从数据库取得的数据,在同一个地方循环显示。

解决方案 »

  1.   

    啥米意思?
    数据库数据打印到table里?这个应该是asp做的事情。
    还是页面上的table里已经有若干数据,需要用jquery循环,把每个td里的读取出来?
      

  2.   

    网上搜superMarquee
    一个jQuery插件,很好用的。
      

  3.   

    通过加框ul,li                    <tr style="height: 125px;">
                            <td colspan="2">
                             <div id="marquee5">
    <ul>                    <asp:Repeater ID="JxtdRepeater2" runat="server">
                        <ItemTemplate>
                        <li>
                                <table cellpadding="0" cellspacing="0" style="width: 220px">
                                    <tr>
                                        <td style="width: 100px" align="center" ><img src=<%# Eval("Item3")%> height="120" width="84" /></td>
                                        <td style="width: 120px;line-height: 150%">姓名:<%# Eval("Item2")%><br><%# Eval("Item4").ToString.Replace(vbCrLf, "<br>")%></td>
                                    </tr>
                                </table>
                        </li>
                        </ItemTemplate>
                        </asp:Repeater>
    </ul>
    </div>                        </td>
                        </tr>并控制样式 #marquee5 {width:220px;height:125px; overflow:hidden;}
    #marquee5 ul
    {
        padding: 0px;
        float: left;
        list-style: none;
        width: 220px;
        margin: 0px;
    }
    #marquee5 ul li
    {
        margin: 0px;
        float: left;
        width: 220px;
        height: 125px;
        padding: 0px;
        text-align: left;
        display: inline;
    }使用
    <script src="Scripts/kxbdSuperMarquee.js" type="text/javascript"></script>
    $(function () {    //一次滚动一屏
        $('#marquee5').kxbdSuperMarquee({
            isEqual: false,
            distance: 125,
            time: 4,
            //btnGo:{up:'#goU',down:'#goD'},
            direction: 'up'
        });});解决。
      

  4.   

    <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秒钟切换一条,你可以根据需要更改
    })
      

  5.   

    你这个是网上google的吧,in样式是什么都没说,而且他是li,我是说表格行。
      

  6.   

    你那个不好做滚动,除非修改结构。改成其他效果可以不?淡入淡出什么的。。
    <script type="text/javascript" src="jq.js"></script>
    <script type="text/javascript">
        $(function () {
            var trs = $('#sItem > tbody > tr'), idx = 0;
            trs.filter(':gt(' + idx + ')').hide(); //隐藏其他行
            function animate() {
                idx++;
                if (idx >= trs.length) idx = 0;
                trs.hide().eq(idx).fadeIn(300);
            }
            setInterval(animate, 3000);
        });
    </script>
    <table id="sItem"  style="width: 230px;height: 140px; margin-right: auto; margin-left: auto;">
                        <tr style="height: 125px">
                            <td colspan="2">
                                <table cellpadding="0" cellspacing="0" style="width: 100%">
                                    <tr>
                                        <td style="width: 100px" align="center" ><img src="map.gif" height="120" width="84" /></td>
                                        <td style="line-height: 150%"  ></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr style="height: 125px">
                            <td colspan="2">
                                <table cellpadding="0" cellspacing="0" style="width: 100%">
                                    <tr>
                                        <td style="width: 100px" align="center" ><img src="adsl.jpg" height="120" width="84" /></td>
                                        <td style="line-height: 150%"  ></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr style="height: 125px">
                            <td colspan="2">
                                <table cellpadding="0" cellspacing="0" style="width: 100%">
                                    <tr>
                                        <td style="width: 100px" align="center" ><img src="map.gif" height="120" width="84" /></td>
                                        <td style="line-height: 150%"  ></td>
                                    </tr>
                                </table>
                            </td>
                        </tr><tr style="height: 125px">
                            <td colspan="2">
                                <table cellpadding="0" cellspacing="0" style="width: 100%">
                                    <tr>
                                        <td style="width: 100px" align="center" ><img src="adsl.jpg" height="120" width="84" /></td>
                                        <td style="line-height: 150%"  ></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
      

  7.   

    给个建议,先把数据库里的数据读出来,存进一个json数组里,然后用jquery分个读取。