<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无间断图片轮滚</title>
<style>img{border:0}</style>
</head>
<body>
<!--
*****fason(2002-5-17)******
-->
<div id=oDiv style="width:200;border:1 solid red;overflow:hidden" onmouseover="clearInterval(s)" onmouseout="s=setInterval(fsnMarquee,20)">
<div >
<table border="1" width="100%">
  <tr>
    <td width="100%" id=oCont><nobr><a href=1.htm><img src=csdn.gif></a><a href=2.htm><img src=csdn.gif></a><a href=3.htm><img src=1.JPG width=100 ></a></nobr>
</td>
  </tr>
</table>
</div>
</div>
<script>
var i=0
var s=null
function fsnMarquee(){
if(oDiv.scrollLeft>=(oCont.offsetWidth-oDiv.offsetWidth)/2){
oCont.firstChild.innerHTML+=oCont.firstChild.children[i].outerHTML
i++
}
else oDiv.scrollLeft++;
}
window.onload=function(){s=setInterval(fsnMarquee,20)} 
</script>
</body>
</html>

解决方案 »

  1.   

    帮忙看看,我用上面这方式但图片动都不动<table width="95%" border="0" cellspacing="0" cellpadding="0">
            <tr> 
              <td width="2%"><img src="images/a_01.gif" width="38" height="104"></td>
              <td width="89%" background="images/a_03.gif">
      <div id=oDiv style="width:500;border:1 solid red;overflow:hidden" onmouseover="clearInterval(s)" onmouseout="s=setInterval(fsnMarquee,20)">
    <div >
      
      <table width="100%" border="0" cellspacing="2" cellpadding="2">
                  <tr> 
                    <td width="27%"><a href="case_1.php" target="_blank"><img src="images/a_04.gif" width="100" height="62" border="0"></a></td>
                    <td width="27%"><a href="case_2.php" target="_blank"><img src="images/a_05.gif" width="100" height="62" border="0"></a></td>
                    <td width="15%"><a href="case_3.php" target="_blank"><img src="images/a_06.gif" width="100" height="62" border="0"></a></td>
                    <td width="31%"><a href="case_4.php" target="_blank"><img src="images/a_07.gif" width="87" height="62" border="0"></a></td>
                  </tr>
                  <tr align="center"> 
                    <td><a href="case_1.php" target="_blank" class="b03"><font color="#0000FF">万国广场</font></a></td>
                    <td><a href="case_2.php" target="_blank" class="b03"><font color="#0000FF">天河都市广场</font></a></td>
                    <td><a href="case_3.php" target="_blank" class="b03"><font color="#0000FF">丽影商业广场</font></a></td>
                    <td><a href="case_4.php" target="_blank" class="b03"><font color="#0000FF">南宁太阳广场</font></a></td>
                  </tr>
                </table>
    </div>
    </div>
    <script>
    var i=0
    var s=null
    function fsnMarquee(){
    if(oDiv.scrollLeft>=(oCont.offsetWidth-oDiv.offsetWidth)/2){
    oCont.firstChild.innerHTML+=oCont.firstChild.children[i].outerHTML
    i++
    }
    else oDiv.scrollLeft++;
    }
    window.onload=function(){s=setInterval(fsnMarquee,20)} 
    </script>
    </td>
              <td width="9%"><img src="images/a_02.gif" width="43" height="104"></td>
            </tr>
          </table>
      

  2.   

    <table width="95%" border="0" cellspacing="0" cellpadding="0">
            <tr> 
              <td width="2%"><img src="images/a_01.gif" width="38" height="104"></td>
              <td width="89%" background="images/a_03.gif">
      <div id=oDiv style="width:500;border:1 solid red;overflow:hidden" onmouseover="clearInterval(s)" onmouseout="s=setInterval(fsnMarquee,20)">   
      <table border="0" cellspacing="2" cellpadding="2" id=oCont>
                  <tr id="oCont1"> 
                    <td width="27%"><a href="case_1.php" target="_blank"><img src="images/a_04.gif" width="100" height="62" border="0"></a></td>
                    <td width="27%"><a href="case_2.php" target="_blank"><img src="images/a_05.gif" width="100" height="62" border="0"></a></td>
                    <td width="15%"><a href="case_3.php" target="_blank"><img src="images/a_06.gif" width="100" height="62" border="0"></a></td>
                    <td width="31%"><a href="case_4.php" target="_blank"><img src="images/a_07.gif" width="200" height="62" border="0"></a></td>
                  </tr>
                  <tr align="center" id="oCont2"> 
                    <td><a href="case_1.php" target="_blank" class="b03"><font color="#0000FF">万国广场</font></a></td>
                    <td><a href="case_2.php" target="_blank" class="b03"><font color="#0000FF">天河都市广场</font></a></td>
                    <td><a href="case_3.php" target="_blank" class="b03"><font color="#0000FF">丽影商业广场</font></a></td>
                    <td><a href="case_4.php" target="_blank" class="b03"><font color="#0000FF">南宁太阳广场</font></a></td>
                  </tr>
                </table>
    </div>
    <script>
    var i=0
    var s=null
    function fsnMarquee(){
    if(oDiv.scrollLeft>=oCont.offsetWidth-oDiv.offsetWidth){
    oCont1.insertCell().innerHTML=oCont1.children[i].innerHTML
    oCont2.insertCell().innerHTML=oCont2.children[i].innerHTML
    i++
    }
    else oDiv.scrollLeft++;
    }
    window.onload=function(){s=setInterval(fsnMarquee,20)} 
    document.body.onclick=function(){alert(event.srcElement.outerHTML)}
    </script>
    </td>
              <td width="9%"><img src="images/a_02.gif" width="43" height="104"></td>
            </tr>
          </table>