文字不间断向左滚动代码

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>文字不间断滚动</title>
<STYLE>BODY {
FONT-SIZE: 12px}
TABLE {
FONT-SIZE: 12px}
TD {
FONT-SIZE: 12px}
</STYLE>
</head>
<body>
<table width="543" height="25" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #33adad;">
   <tr> 
     <td valign="bottom" bgcolor="#FFFFFF" width="543"> <div style="width:543px;height:21px;overflow:hidden" onMouseOver="stop()" onMouseOut="start()"> 
         <table width="543" border="0" cellspacing="0" cellpadding="0" id="scrollimg" height="21">
           <tr> 
             <td id="simg"> <TABLE width="543" border="0" cellspacing="0" cellpadding="0" height="21">
                 <tr> 
                   <td nowrap> <FONT color=#FF6C02>·</FONT><A href="1.html" >1Java专业认证/培训专题 思科专业认证攻略</A> 
                     <FONT color=#FF6C02>·</FONT><A href="2.html" >2Java专业认证/培训专题 思科专业认证攻略</A> <FONT color=#FF6C02>·</FONT><A href="3.html" >3Java专业认证/培训专题 思科专业认证攻略</A> 
                   </td>
                 </tr>
               </TABLE></td>
             <td id="simg1"></td>
           </tr>
         </table>
       </div>
       <SCRIPT LANGUAGE="JavaScript">
var tm=null
function newsScroll() {
if(scrollimg.parentNode.scrollLeft!=(scrollimg.clientWidth/2))
scrollimg.parentNode.scrollLeft++;
else
scrollimg.parentNode.scrollLeft=0
}
function window.onload() {
simg1.innerHTML=simg.innerHTML
tm=setInterval('newsScroll()',20) 
}
function stop()
{
clearInterval(tm)
}
function start()
{
tm=setInterval('newsScroll()',20) 
}
</SCRIPT> </td>
   </tr>
</table>
</body>
</html>

 

posted @ 2012-12-11 12:35  屌丝大叔的笔记  阅读(517)  评论(0编辑  收藏  举报