中文(简体)
<HTML> <样式> <!-- #ticker { width:800px;行高:1.2em;背景颜色:浅蓝色; } --> </style> <script language="JavaScript1.2"> //配置tickercontents[]设置你希望显示的信息(接受HTML代码)//设置内容显示 vartickercontents=new Array()tickercontents [0]='了解 Dynamic Drive 的新增功能。 <a href="../../../dynamicdrive.com/new.htm">[了解更多]</a>'tickercontents[1]='浏览动态驱动器上最流行的脚本<a href= "../../../dynamicdrive.com/hot.htm">[了解更多]</a>'tickercontents[2]='链接回 Dynamic Drive! <a href="../../../dynamicdrive.com/link.htm">[阅读更多]</a>' //配置以下变量以确定消息滴答之间的延迟(以毫秒为单位) /设置延迟时间 var tickdelay=3000 ////不要编辑此行//////////////// var currentmessage=0 function changetickercontent(){ticker.innerHTML=tickercontents[currentmessage ] if (currentmessage==tickercontents.length-1) currentmessage=0 else currentmessage++ setTimeout("changetickercontent()",tickdelay) } function start_ticking(){ changetickercontent() } window.onload=start_ticking </script> <div id= "ticker"left=0 top=0></div> </HTML>