setInterval(dd,1000); 
function dd() 

document.body.clientwidth=document.body.clientwidth+10 +"px"
setTimeout(document.body.clientwidth=(document.body.clientwidth-10)+"px"
,100); 

解决方案 »

  1.   

    改为这样也不行:<script language="javascript">
    setInterval(dd,1000);
    function dd()
    {
    window.self.moveby(10,10);
    setTimeout(window.sself.moveby(-10,-10),100);
    }
    </script>错误,对像不支持此属于或方法
      

  2.   

    改成下面这样行不行,好像moveBy中的B是大写的
    <script language="javascript"> 
    setInterval(ss,1000); 
    function dd() 

    window.self.moveBy(10,10); 
    setTimeout(window.self.moveBy(-10,-10),100); 

    </script>
      

  3.   

    报错setTimeout(window.self.moveBy(-10,-10),100); 
    说参数无效
      

  4.   

    同学们啊,区分大小写啊
    clientwidth  ==>  clientWidth
    还有 clientWidth是只读的clientWidth Property
    --------------------------------------------------------------------------------
    Retrieves the width of the object including padding, but not including margin, border, or scroll bar.Syntax: [ iWidth = ] object.clientWidth Possible Values
    iWidth Integer that receives the width of the object, in pixels. 
    The property is read-only. The property has no default value.
      

  5.   

    同学们啊,区分大小写啊 
    clientwidth  ==>  clientWidth 
    还有 clientWidth是只读的 前面没测试.后来测试知道
      

  6.   

    我自已也忘了,JAVASCRIPT中本来就是区分大小写的.