Home > Web Front-end > JS Tutorial > body text

Real continuous scrolling pictures_image special effects

PHP中文网
Release: 2016-05-16 19:26:16
Original
823 people have browsed it

js code

<SCRIPT language=JavaScript>                       
function marquee1()                       
{                       
  document.write("<p style=&#39;width:100%;overflow:hidden;&#39; id=marquee onmouseover=clearInterval(repeat)  onmouseout=repeat=setInterval(scrollMarquee,1)>")                       
}                       
function marquee2()                       
{                 
  document.write("</p>")    
  marquee.childNodes[0].align=&#39;left&#39;; 
  
  if(marquee.childNodes[0].offsetWidth>marquee.offsetWidth) { 
   marquee.appendChild(marquee.childNodes[0].cloneNode(true)); 
   } 
  else { 
   for(var i=0;i<Math.round(marquee.offsetWidth/marquee.childNodes[0].offsetWidth)+1;i++) { 
    marquee.appendChild(marquee.childNodes[0].cloneNode(true)); 
    } 
   } 
  repeat=setInterval(scrollMarquee,1); 
}                       
function scrollMarquee() { 
 if(marquee.scrollLeft<marquee.childNodes[0].offsetWidth) 
  marquee.scrollLeft++; 
 else  
  marquee.scrollLeft=0; 
  }                   
</SCRIPT> 

            <SCRIPT language=JavaScript>marquee1();</SCRIPT> 
<table width="300" border="0" cellspacing="0" cellpadding="0"> 
<tr> 


<td><a href=/picture/00000133.asp  target=_blank ><img border=0 height=67 src="http://www.51sql.com/articleimg/gundong1.jpg"  alt="图片8" ></a></td> 

<td><a href=/picture/00000132.asp  target=_blank ><img border=0 height=67 src="http://www.51sql.com/articleimg/gundong2.jpg"  alt="图片7" ></a></td> 

<td><a href=/picture/00000131.asp  target=_blank ><img border=0 height=67 src="http://www.51sql.com/articleimg/gundong3.jpg"  alt="图片6" ></a></td> 

<td><a href=/picture/00000130.asp  target=_blank ><img border=0 height=67 src="http://www.51sql.com/articleimg/gundong4.gif"  alt="图片5" ></a></td> 

<td><a href=/picture/00000129.asp  target=_blank ><img border=0 height=67 src="http://www.51sql.com/articleimg/gundong4.gif"  alt="图片4" ></a></td> 

<td><a href=/picture/00000128.asp  target=_blank ><img border=0 height=67 src="http://www.51sql.com/articleimg/gundong3.jpg"  alt="图片3" ></a></td> 

<td><a href=/picture/00000127.asp  target=_blank ><img border=0 height=67 src="http://www.51sql.com/articleimg/gundong2.jpg"  alt="图片2" ></a></td> 

<td><a href=/picture/00000126.asp  target=_blank ><img border=0 height=67 src="http://www.51sql.com/articleimg/gundong1.jpg"  alt="图片1" ></a></td> 


</tr> 
</table> 
            <SCRIPT language=JavaScript>marquee2(); </SCRIPT>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template