js 代码
- <style>a{display:block;font-size:15px};</style>
- <div id="div1" style="width:300px;height:68px;overflow:hidden">
- <a href="JAVAscript:">1,你可曾有过无数的梦想,</a>
- <a href="JAVAscript:">2,却在时光的流逝里幻灭 </a>
- <a href="JAVAscript:">3,你可曾对未来期待憧憬,</a>
- <a href="JAVAscript:">4,却在成长的岁月中迷失</a>
- <a href="JAVAscript:">5,CSDN中国程序员论坛</a>
- <a href="JAVAscript:">6,大家一起来</a>
- <a href="JAVAscript:">7,好象都很不错的样子</a>
- </div>
js 代码
- <script>
- var t=setInterval(myfunc,1000)
- var d=document.getElementById("div1")
- function myfunc(){
- var o=d.firstChild
- d.removeChild(o)
- d.appendChild(o)
- }
- d.οnmοuseοver=function(){clearInterval(t)}
- d.οnmοuseοut=function(){t=setInterval(myfunc,1000)}
- </script>
只显示1行:
js 代码
- "div1" style="width:300px;height:15px;overflow:hidden">