firefox 数据 间歇滚动

Doson 2010-06-28 01:52:55

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WUCNewGo.ascx.cs" Inherits="user_WUCNewGo" %>
<div id=icefable1>
<asp:GridView ID="GridViewNew1" runat="server" ShowFooter="false" ShowHeader="false" AllowPaging="false" AllowSorting="false" BorderWidth="0" Width="100%" AutoGenerateColumns="false" >
<Columns>
<asp:TemplateField>
<ItemTemplate>
<table width="100%" border="0" style="text-align:center;font-family:宋体" cellpadding="0" cellspacing="0">
<tr>
<td style="width:5%;"><span style="color:black">*</span></td>
<td style="width:95%" align="left"><a style="color:#004B80" href="<%# Eval("IPADRESS")%>" target="_blank" onmousemove="this.style.textDecoration='underline';this.style.color='blue'" onmouseout="this.style.textDecoration='none';this.style.color='#004B80';"><%#(Eval("NAME"))%></a></td>
</tr>
</table>
</ItemTemplate>
<%-- <ItemStyle HorizontalAlign="left" Height="15" BorderWidth="0"/>--%>
</asp:TemplateField>
</Columns>
</asp:GridView>

<script type="text/javascript">
marqueesHeight=105;
stopscroll=false;
with(icefable1)
{
style.width=313;
style.height=marqueesHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
onmouseover=new Function("stopscroll=true");
onmouseout=new Function("stopscroll=false");
}
preTop=0; currentTop=marqueesHeight; stoptime=0;
icefable1.innerHTML+=icefable1.innerHTML;


function init_srolltext()
{
icefable1.scrollTop=0;
setInterval("scrollUp()",1);
}init_srolltext();

function scrollUp()
{
if(stopscroll==true) return;
currentTop+=1;
if(currentTop==marqueesHeight+1)
{
stoptime+=1;
currentTop-=1;
if(stoptime==600)
{
currentTop=0;
stoptime=0;
}
}
else
{
preTop=icefable1.scrollTop;
icefable1.scrollTop+=1;
if(preTop==icefable1.scrollTop){
icefable1.scrollTop=marqueesHeight;
icefable1.scrollTop+=1;

}
}

}
init_srolltext();
</script>
</div>


这段代码 在IE 中可以正常滚动,如果放在firefox 就无法滚动,并会把从数据库中读出的数据 全部显示出来,高手帮解决一下
...全文
36 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Doson 2010-06-28
  • 打赏
  • 举报
回复
为什么没人
xtyiliu 2010-06-28
  • 打赏
  • 举报
回复
帮顶下!!!

62,073

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧