您的位置:首页 > 编程语言

文字不间断向左滚动代码

2012-12-11 12:35 267 查看
<!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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: