要设置一个向上滚动的信息浏览窗口,类似于一个左右滚动的图片广告。先弄一个div当遮罩,设置overflow:hidden,再然div里的table内容向上滚动,把滚动出div的内容加到table末尾。
_ueditor_page_break_tag_
<div class="box"> <table id="GridViewShowAuction"> <tr> <td> </td> </tr> ..... </table> </div> <style type="text/css"> .box { height:580px; overflow:hidden; } </style>
var tip = setInterval("Roll()", "10000"); //滚动 function Roll() { $("#GridViewShowAuction").animate({ marginTop: "-45px" }, "slow", function () { ($('#GridViewShowAuction tr:first').nextAll('tr:last')).after($('#GridViewShowAuction tr:first')); $("#GridViewShowAuction").css("margin-top", "0px"); }); }