设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 188|回复: 2
打印 上一主题 下一主题

教程:表格里面的连续循环滚动的新闻

[复制链接]
跳转到指定楼层
1#
发表于 2009-9-15 02:54:52 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
请勿带外部链接,为别的网站做广告宣传,谢谢。 (2009-02-13 14:52)[HTML]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script LANGUAGE="JavaScript">
<!--
function _InitScroll(_S1,_S2,_W,_H,_T){
return "var marqueesHeight"+_S1+"="+_H+";var stopscroll"+_S1+"=false;var scrollElem"+_S1+"=document.getElementById('"+_S1+"');with(scrollElem"+_S1+"){style.width="+_W+";style.height=marqueesHeight"+_S1+";style.overflow='hidden';noWrap=true;}scrollElem"+_S1+".onmouseover=new Function('stopscroll"+_S1+"=true');scrollElem"+_S1+".onmouseout=new Function('stopscroll"+_S1+"=false');var preTop"+_S1+"=0; var currentTop"+_S1+"=0; var stoptime"+_S1+"=0;var leftElem"+_S2+"=document.getElementById('"+_S2+"');scrollElem"+_S1+".appendChild(leftElem"+_S2+".cloneNode(true));setTimeout('init_srolltext"+_S1+"()',"+_T+");function init_srolltext"+_S1+"(){scrollElem"+_S1+".scrollTop=0;setInterval('scrollUp"+_S1+"()',50);}function scrollUp"+_S1+"(){if(stopscroll"+_S1+"){return;}currentTop"+_S1+"+=1;if(currentTop"+_S1+"==(marqueesHeight"+_S1+"+1)) {stoptime"+_S1+"+=1;currentTop"+_S1+"-=1;if(stoptime"+_S1+"=="+_T/50+") {currentTop"+_S1+"=0;stoptime"+_S1+"=0;}}else{preTop"+_S1+"=scrollElem"+_S1+".scrollTop;scrollElem"+_S1+".scrollTop +=1;if(preTop"+_S1+"==scrollElem"+_S1+".scrollTop){scrollElem"+_S1+".scrollTop=0;scrollElem"+_S1+".scrollTop +=1;}}}";
}

//-->
</script>

<title>无标题文档</title>
<style type="text/css">
<!--
UNKNOWN {
FONT-SIZE: 12px; FONT-FAMILY: Tahoma, Arial, Helvetica, sans-serif
}
body{
font-family: Arial, "宋体";
font-size: 12px;
color: #333333;
text-decoration: none;
line-height: 1.8;
margin:0;
text-align: justify;
text-justify:inter-ideograph;
background-color:#cecfce;
/*cursor:url(../images/df.cur); */
}
a {
font-size: 12px; color: #000000;
}
a:link {
font-size: 12px;text-decoration: none;
}
a:visited {
font-size: 12px;text-decoration: none;
}
a:hover {
font-size: 12px;text-decoration: none;color: #FFFFFF;
}
a:active {
font-size: 12px;text-decoration: none;

}
#content-news{
FLOAT: left; margin-left:9px;WIDTH: 483px;POSITION: absolute; HEIGHT:100%; border:#BDCFAD 1px solid;
}
-->
</style>
</head>

<body>

<div id="content-news">
<!--**********************列表**************************** -->
<div id=Scroll_news1>
<div id=Scroll_news2>
<table width="100%" border="0" cellspacing="0" cellpadding="0" >

<tr onmouseover="this.style.background='#cccc99'" onmouseout="this.style.background=''">
<td width="5%" height="30" align="center"><img src="http://www.isinwin.com/_isw_code/index_news-ico.gif" width="5" height="3" /></td>
<td width="80%"><a href="http://www.isinwin.com">第1行,点点看</a></td>
<td width="15%" align="center">2009-1-23</td>
</tr><tr onmouseover="this.style.background='#cccc99'" onmouseout="this.style.background=''">
<td width="5%" height="30" align="center"><img src="http://www.isinwin.com/_isw_code/index_news-ico.gif" width="5" height="3" /></td>
<td width="80%"><a href="http://www.isinwin.com">第2行,点点看</a></td>
<td width="15%" align="center">2009-1-23</td>
</tr>
<tr onmouseover="this.style.background='#cccc99'" onmouseout="this.style.background=''">
<td width="5%" height="30" align="center"><img src="http://www.isinwin.com/_isw_code/index_news-ico.gif" width="5" height="3" /></td>
<td width="80%"><a href="http://www.isinwin.com">第3行,点点看</a></td>
<td width="15%" align="center">2009-1-23</td>
</tr>
<tr onmouseover="this.style.background='#cccc99'" onmouseout="this.style.background=''">
<td width="5%" height="30" align="center"><img src="http://www.isinwin.com/_isw_code/index_news-ico.gif" width="5" height="3" /></td>
<td width="80%"><a href="http://www.isinwin.com">第4行,点点看</a></td>
<td width="15%" align="center">2009-1-23</td>
</tr>
<tr onmouseover="this.style.background='#cccc99'" onmouseout="this.style.background=''">
<td width="5%" height="30" align="center"><img src="http://www.isinwin.com/_isw_code/index_news-ico.gif" width="5" height="3" /></td>
<td width="80%"><a href="http://www.isinwin.com">第5行,点点看</a></td>
<td width="15%" align="center">2009-1-23</td>
</tr><tr onmouseover="this.style.background='#cccc99'" onmouseout="this.style.background=''">
<td width="5%" height="30" align="center"><img src="http://www.isinwin.com/_isw_code/index_news-ico.gif" width="5" height="3" /></td>
<td width="80%"><a href="http://www.isinwin.com">第6行,点点看</a></td>
<td width="15%" align="center">2009-1-23</td>
</tr><tr onmouseover="this.style.background='#cccc99'" onmouseout="this.style.background=''">
<td width="5%" height="30" align="center"><img src="http://www.isinwin.com/_isw_code/index_news-ico.gif" width="5" height="3" /></td>
<td width="80%"><a href="http://www.isinwin.com">第7行,点点看</a></td>
<td width="15%" align="center">2009-1-23</td>
</tr>
<tr onmouseover="this.style.background='#cccc99'" onmouseout="this.style.background=''">
<td width="5%" height="30" align="center"><img src="http://www.isinwin.com/_isw_code/index_news-ico.gif" width="5" height="3" /></td>
<td width="80%"><a href="http://www.isinwin.com">第8行,点点看</a></td>
<td width="15%" align="center">2009-1-23</td>
</tr>
<tr onmouseover="this.style.background='#cccc99'" onmouseout="this.style.background=''">
<td width="5%" height="30" align="center"><img src="http://www.isinwin.com/_isw_code/index_news-ico.gif" width="5" height="3" /></td>
<td width="80%"><a href="http://www.isinwin.com">第9行,点点看</a></td>
<td width="15%" align="center">2009-1-23</td>
</tr>
<tr onmouseover="this.style.background='#cccc99'" onmouseout="this.style.background=''">
<td width="5%" height="30" align="center"><img src="http://www.isinwin.com/_isw_code/index_news-ico.gif" width="5" height="3" /></td>
<td width="80%"><a href="http://www.isinwin.com">第10行,点点看</a></td>
<td width="15%" align="center">2009-1-23</td>
</tr>

<tr>
<td height="30" colspan="3" align="center" class="bottom">--- End ---</td>
</tr>
</table>
</div></div></div>
<SCRIPT language=JavaScript>
eval(_InitScroll("Scroll_news1","Scroll_news2",483,30*5,1000));
//eval(_InitScroll("Scroll_reports1","Scroll_reports2",483,30*5,1000));
</SCRIPT>
</body>
</html>
[/HTML]
3#
发表于 2010-3-7 23:05:09 | 只看该作者
我认为,如果不把楼主的帖子顶上去,就是对真理的一种背叛,就是对谬论的极大妥协
回复 支持 反对

使用道具 举报

2#
发表于 2010-2-10 09:05:07 | 只看该作者
美丽让男人停下,智慧让男人留下。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-18 22:45 , Processed in 0.132279 second(s), 9 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表