这是原来收集的代码,非原创:

<div style="width: 200px; height: 150px; overflow: hidden;"><script language="javascript">
document.write(news.tBodies[0].innerHTML);
</script>
<table id="news" style="position: relative; top: 0px; width: 200px; table-layout: fixed;" cellspacing="0" cellpadding="5" bgcolor="#F8F8F8">
<tbody>
<tr>
<td valign="top" height="150"><b>新闻一</b>
<p> </p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
</td>
</tr>
<tr>
<td valign="top" height="150"><b>新闻二</b>
<p> </p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
</td>
</tr>
<tr>
<td valign="top" height="150"><b>新闻三</b>
<p> </p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
<p>新闻内容</p>
</td>
</tr>
</tbody>
</table>
</div>
<script language="javascript">
function newsScroll(){
news.style.pixelTop=(news.style.pixelTop-1)%(news.clientHeight/2);
}
timer1=setInterval('newsScroll()',10);
</script>

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.