日期:2014-05-17 浏览次数:20621 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>图片循环</title> </head> <body> <DIV align=center> <DIV style="overflow:hidden;width:210px; border:1px solid #000;" > <DIV id=news style="width:100px;LEFT: 0px; WHITE-SPACE: nowrap; POSITION: relative; TOP: 0px;border:1px solid #000; z-index:1"><SPAN id=nbo><IMG height=80 src="images/1_1.jpg" width=80> <IMG height=80 src="images/2_1.jpg" width=80> <IMG height=80 src="images/3_1.jpg" width=80> <IMG height=80 src="images/4_1.jpg" width=80> <IMG height=80 src="images/1_1.jpg" width=80> <IMG height=80 src="images/2_1.jpg" width=80> <IMG height=80 src="images/3_1.jpg" width=80> <IMG height=80 src="images/4_1.jpg" width=80></SPAN> <SCRIPT language=javascript> //重复一次新闻内容 document.write(nbo.innerHTML); </SCRIPT> </DIV></DIV> <SCRIPT language=javascript> //实现不间断滚动 function newsScroll() { news.style.pixelLeft=(news.style.pixelLeft-1)%nbo.offsetWidth; } //timer1=setInterval('newsScroll()',20) //更改第二个参数可以改变速度,值越小,速度越快。 </SCRIPT> </DIV> </body> </html>