<div id="demo" style="overflow: hidden; width: px; border: px">
<table width="" height="" border="" cellpadding="" cellspacing=""
background="Images/img/jpg">
<tr>
<td align="center" id="demo" valign="bottom">
<asp:DataList ID="DataList" runat="server"
RepeatDirection="Horizontal" DataSourceID="ObjectDataSource">
<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="ObjectDataSource" runat="server" SelectMethod="SelectInfo"
TypeName="HotelDALKeFangServices"></asp:ObjectDataSource>
</td>
<% 這一步很重要 %>
<td id="demo" align="center" valign="bottom">
</td>
</tr>
</table>
</div>
<script>
//滾動的速度數值越大速度越慢
var speed =
demoinnerHTML = demoinnerHTML
//從右至左
function Marquee() {
if (demooffsetWidth demoscrollLeft <= )
demoscrollLeft =
else
demoscrollLeft++
}
var MyMar = setInterval(Marquee speed)
demoonmouseover = function () { clearInterval(MyMar) }
demoonmouseout = function () { MyMar = setInterval(Marquee speed) }
</script>
From:http://tw.wingwit.com/Article/program/net/201311/14420.html