正文

文字向上移动2007-06-04 13:50:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/wangsdong/26388.html

分享到:

<style>.black12 {font-size:12px;color:#000000;}a.black12:link {font-size:12px;color:#000000;text-decoration:none;}a.black12:visited {font-size:12px;color:#000000;text-decoration:none;}a.black12:hover {font-size:12px;color:#000000;text-decoration:underline;}a.black12line:link {font-size:12px;color:#000000;text-decoration:underline;}a.black12line:visited {font-size:12px;color:#000000;text-decoration:underline;}a.black12line:hover {font-size:12px;color:#000000;text-decoration:none;}</style><TABLE border=1 width=200><TR> <TD><div id="marquees"><div class="details"><a href='http://www.sina.com.cn' target='_blank' class="black12 blackDot"><li>新浪</li></a><a href='http://www.baidu.com' target='_blank' class="black12 blackDot"><li>百度</li></a><a href='http://www.google.com' target='_blank' class="black12 blackDot"><li>google</li></a><a href='http://www.yahoo.com.cn' target='_blank' class="black12 blackDot"><li>雅虎</li></a><a href='http://www.163.com' target='_blank' class="black12 blackDot"><li>网易</li></a><a href='http://www.sohu.com' target='_blank' class="black12 blackDot"><li>搜狐</li></a></div></div></TD></TR></TABLE><script language="javascript">marqueesHeight=100;stopscroll=false;with(document.getElementById("marquees")){ style.width=0; style.height=marqueesHeight; style.overflowX="visible"; style.overflowY="hidden"; noWrap=true; onmouseover=new Function("stopscroll=true"); onmouseout=new Function("stopscroll=false");}document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden"></div>'); preTop=0; currentTop=0; function init(){document.getElementById("templayer").innerHTML="";while(document.getElementById("templayer").offsetHeight<marqueesHeight){document.getElementById("templayer").innerHTML+=document.getElementById("marquees").innerHTML;}document.getElementById("marquees").innerHTML=document.getElementById("templayer").innerHTML+document.getElementById("templayer").innerHTML;setInterval("scrollUp()",30);}document.body.onload=init; function scrollUp(){if(stopscroll==true) return;preTop=document.getElementById("marquees").scrollTop;document.getElementById("marquees").scrollTop+=1;if(preTop==document.getElementById("marquees").scrollTop){document.getElementById("marquees").scrollTop=document.getElementById("templayer").offsetHeight-marqueesHeight;document.getElementById("marquees").scrollTop+=1;}}</script>

阅读(4165) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册