大侠们,请出招吧
两各JS脚本单各可以使用,一个是加胶片效果的,另一个是滚动效果的,嵌套之后,就不动了。急急急。这是滚动效果的:<script type="text/javascript">
  var speed=2
  demo2.innerHTML=demo1.innerHTML
  function Marquee(){
  if(demo2.offsetWidth-demo.scrollLeft<=0)
  demo.scrollLeft-=demo1.offsetWidth
  else{
  demo.scrollLeft++
  }
  }
  var MyMar=setInterval(Marquee,speed)
  demo.onmouseover=function() {clearInterval(MyMar)}
  demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
  </script><div id=demo style=overflow:hidden;height:120px;width:1200px;color:#ff0000>
   <table align=left cellpadding=0 cellspace=0 border=0>
       <tr>
           <td id=demo1 valign=top>
              <table border=0 cellpadding=0 cellspacing=0>
                 <tr>
          <td><img src="/jsimg/1.jpg" width=150 height=100  class=b5 hspace=22></td>
                   <td><img src="/jsimg/2.jpg" width=150 height=100  class=b5 hspace=22></td>
                   <td><img src="/jsimg/3.jpg" width=150 height=100  class=b5 hspace=22></td>
                   <td><img src="/jsimg/4.jpg" width=150 height=100  class=b5 hspace=22></td>
                   <td><img src="/jsimg/5.jpg" width=150 height=100  class=b5 hspace=22></td>
                 </tr>
             </table>
           </td>
           <td id=demo2 valign=top></td>
       </tr>
   </table>
 </div>这各是胶片效果的是调用其他的js文件 
在img 中加了一个class=“filmed istrip50 icolor402000 noshadow”添加了样式。
不知道这个样式对上述的滚动效果是否有影响。
问题出在什么地方,或求其他解决方案!谢谢!

解决方案 »

  1.   

    我直接给你个例子得了~~<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>网页特效|Linkweb.cn/Js|--- 图片播放器</title>
    </head>
    <body>
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    var Onerotate_delay = 2000; // delay in milliseconds (5000 = 5 secs)
    Onecurrent = 0;
    var OneLinks = new Array(3);
    OneLinks[0] = "#";
    OneLinks[1] = "#";
    OneLinks[2] = "#";
    function Onenext() {
    if (document.Oneslideform.Oneslide[Onecurrent+1]) {
    document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent+1].value;
    document.Oneslideform.Oneslide.selectedIndex = ++Onecurrent;
        }
    else Onefirst();
    }
    function Oneprevious() {
    if (Onecurrent-1 >= 0) {
    document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent-1].value;
    document.Oneslideform.Oneslide.selectedIndex = --Onecurrent;
        }
    else Onelast();
    }
    function Onefirst() {
    Onecurrent = 0;
    document.images.Oneshow.src = document.Oneslideform.Oneslide[0].value;
    document.Oneslideform.Oneslide.selectedIndex = 0;
    }
    function Onelast() {
    Onecurrent = document.Oneslideform.Oneslide.length-1;
    document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
    document.Oneslideform.Oneslide.selectedIndex = Onecurrent;
    }
    function Oneap(text) {
    document.Oneslideform.Oneslidebutton.value = (text == "Stop") ? "Start" : "Stop";
    Onerotate();
    }
    function Onechange() {
    Onecurrent = document.Oneslideform.Oneslide.selectedIndex;
    document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
    }
    function Onerotate() {
    if (document.Oneslideform.Oneslidebutton.value == "Stop") {
    Onecurrent = (Onecurrent == document.Oneslideform.Oneslide.length-1) ? 0 : Onecurrent+1;
    document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
    document.Oneslideform.Oneslide.selectedIndex = Onecurrent;
    window.setTimeout("Onerotate()", Onerotate_delay);
    }
    }
    function Onetransport(){
    window.location=OneLinks[Onecurrent]
    }
    //   End -->
    </SCRIPT>
    <TABLE border="0" cellspacing="0" cellpadding="0">
       <TR>
         <TD>
           <form name="Oneslideform" >
             <DIV align="center">
                           <TABLE width="161" border="1" cellspacing="0" cellpadding="4" bordercolor="#FF99CC">
                             <TR> 
                               <TD width="149" bgcolor="#FFFFFF"> <DIV align="center"><A href="javascript:Onetransport()"><IMG src="a.gif" width="140" height="105" name="Oneshow" border="0"></A></DIV></TD>
                             </TR>
                             <TR> 
                               <TD bgcolor="#FFE1F5"> 
                                 <DIV align="center"> 
                                   <SELECT name="Oneslide" onChange="Onechange();">
                                     <OPTION value="a.gif"   selected>图片 1</OPTION>
                                     <OPTION value="b.gif">图片 2</OPTION>
                                     <OPTION value="c.gif">图片 3</OPTION>
                                   </SELECT>
                                 </DIV></TD>
                             </TR>
                             <TR> 
                               <TD bgcolor="#FFE1F5"> 
                                 <DIV align="center"> 
                                   <INPUT type=button onClick="Oneprevious();" value="<<" title="上一个">
                                   <INPUT type=button name="Oneslidebutton" onClick="Oneap(this.value);" value="开始循环" title="自动显示">
                                   <INPUT type=button onClick="Onenext();" value=">>" title="下一个">
                                 </DIV></TD>
                             </TR>
               </TABLE>
             </DIV>
           </form>
         </TD>
       </TR>
    </TABLE>
    </body>
    </html>
      

  2.   

    单个可以实现,但是加了胶片效果之后就不动了!!
    胶片效果的js文件如下:var stripsOnload = window.onload;
    window.onload = function () { if(stripsOnload) stripsOnload(); if(isIE){addIEStrips(); }else {addStrips();}}