给个类似的做参考<head><style type="text/css">
<!--
.opacity {
FILTER: alpha(opacity=100)
}
-->
</style><SCRIPT>
function movstar(obj,a,time){
movx=setInterval("mov("+obj+","+a+")",10)
}
function movover(){
clearInterval(movx)
}
function mov(objiframe,a){
if (objiframe==1){
scrollx=new_date0.document.body.scrollLeft
scrolly=new_date0.document.body.scrollTop
scrolly=scrolly+a
new_date0.window.scroll(scrollx,scrolly)
  }
else {
scrollx=new_date.document.body.scrollLeft
scrolly=new_date.document.body.scrollTop
scrolly=scrolly+a
new_date.window.scroll(scrollx,scrolly)
   }
}
function o_down(theobject){
object=theobject
while(object.filters.alpha.opacity>60){
object.filters.alpha.opacity+=-10}
}
function o_up(theobject){
object=theobject
while(object.filters.alpha.opacity<100){
object.filters.alpha.opacity+=10}
}
function wback(){
if(new_date.history.length==0){window.history.back()}
else{new_date.history.back()}
}
</SCRIPT> 
</head> 
<boby>
<table width="398" border="0" cellspacing="0" height="180">
            <tr> 
              <td width="379" rowspan="3" style="border: 1 solid #737373"><iframe 
      border=0 frameborder=0 framespacing=0 height=100% marginheight=0 
      marginwidth=0 name=new_date0 noResize scrolling=no 
      src="rcg.htm" width=100% vspale="0"> </iframe></td>
              <td width="3" rowspan="3">?</td>
              <td width="12" height="9"><a href="javascript:void(0)"><img src="http://www.38js.com/js/other/scroll1/image/up.gif" width="9" height="9" class=opacity  onMouseDown=movover();movstar(1,-3,2) 
      onMouseOut=movover();o_up(this) onMouseOver=movstar(1,-1,20);o_down(this) 
      onMouseUp=movover();movstar(1,-1,20) alt="点击鼠标可加速滚动" border=0></a></td>
            </tr>
            <tr> 
              <td width="12"><img src="http://www.38js.com/js/other/scroll1/image/scroll.gif" width="9" height="200" ></td>
            </tr>
            <tr> 
              <td width="12" height="2"><a href="javascript:void(0)"><img  src="http://www.38js.com/js/other/scroll1/image/down.gif" width="9" height="9" class=opacity  onMouseDown=movover();movstar(1,3,2) onMouseOut=movover();o_up(this) onMouseOver=movstar(1,1,20);o_down(this) onMouseUp=movover();movstar(1,1,20) alt="点击鼠标可加速滚动" border=0></a></td>
            </tr>
          </table><br><br>
<table width="398" border="0" cellspacing="0" height="180">
            <tr> 
              <td width="379" rowspan="3" style="border: 1 solid #737373"><iframe 
      border=0 frameborder=0 framespacing=0 height=100% marginheight=0 
      marginwidth=0 name=new_date noResize scrolling=no 
      src="rcg.htm" width=100% vspale="0"> </iframe></td>
              <td width="3" rowspan="3">?</td>
              <td width="12" height="9"><a href="javascript:void(0)"><img src="http://www.38js.com/js/other/scroll1/image/up.gif" width="9" height="9" class=opacity  onMouseDown=movover();movstar(2,-3,2) 
      onMouseOut=movover();o_up(this) onMouseOver=movstar(2,-1,20);o_down(this) 
      onMouseUp=movover();movstar(2,-1,20) alt="点击鼠标可加速滚动" border=0></a></td>
            </tr>
            <tr> 
              <td width="12"><img src="http://www.38js.com/js/other/scroll1/image/scroll.gif" width="9" height="200" ></td>
            </tr>
            <tr> 
              <td width="12" height="2"><a href="javascript:void(0)"><img  src="http://www.38js.com/js/other/scroll1/image/down.gif" width="9" height="9" class=opacity  onMouseDown=movover();movstar(2,3,2) onMouseOut=movover();o_up(this) onMouseOver=movstar(2,1,20);o_down(this) onMouseUp=movover();movstar(2,1,20) alt="点击鼠标可加速滚动" border=0></a></td>
            </tr>
          </table></boby>

解决方案 »

  1.   

    你的movstar函数加多了一个参数之后有的地方还是按老的格式调用,会造成传递空指针。自然是不行。按新格式调用的直接把iframe1对象当参数传递给movstar,在movstar里面又把它放进setTimeout里面,并做了字符串加法。字符串加法接收到对象的时候会试图进行toString操作,于是你其实得到的是mov(1,[object])。不信你在movstar里面改一下:function movstar(a,time,framename)
    {
    alert("mov("+a+","+framename+")")
    move=setInterval("mov("+a+","+framename+")",time)
    }问题出来了,怎么解决我就不罗嗦了。