无缝滚动
2014-10-09来源:易贤网

<div style="width:880px;height:21px;overflow:hidden" onMouseOver="stop()" onMouseOut="start()">

<table width="880" border="0" cellspacing="0" cellpadding="0" id="scrollimg" height="21">

<tr>

<td id="simg">

<TABLE width="880" border="0" cellspacing="0" cellpadding="0" height="21">

<tr>

<td>{FS400_head滚动新闻}</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

}

window.onload=function() {

simg1.innerHTML=simg.innerHTML

tm=setInterval('newsScroll()',20)

}

function stop()

{

clearInterval(tm)

}

function start()

{

tm=setInterval('newsScroll()',20)

}

</script>

更多信息请查看IT技术专栏

2025公考·省考培训课程试听预约报名

  • 报班类型
  • 姓名
  • 手机号
  • 验证码
推荐信息