function up()
{
  with(document.all["aa"].style)
  {
    top = (top ? parseInt(top) : 0)+30
  }
}因为你从样式里取出来的top是50px 是字符而不是数字, 所以要转化成数字

解决方案 »

  1.   

    <script language="javascript">
    function up(){
    document.all["aa"].style.top=(parseInt(document.all["aa"].style.top)+30)+"px";
    }
    </script>
      

  2.   

    style="position: absolute;top: 50;  这里要50要有单位 
    Length Units
    长度单位 CSS Version
    版本 Compatibility
    兼容性 Description
    简介 
    相对长度单位  Relative Length Units 
    em CSS1 IE4+ , NS4+ 相对于当前对象内文本的字体尺寸 
    ex CSS1 IE4+ , NS4+ 相对于字符 “ x ” 的高度。通常为字体高度的一半 
    px CSS1 IE3+ , NS4+ 像素(Pixel) 
    绝对长度单位  Absolute Length Units 
    pt CSS1 IE3+ , NS4+ 点(Point) 
    pc CSS1 IE3+ , NS4+ 派卡(Pica)。相当于我国新四号铅字的尺寸 
    in CSS1 IE3+ , NS4+ 英寸(Inch) 
    cm CSS1 IE3+ , NS4+ 厘米(Centimeter) 
    mm CSS1 IE3+ , NS4+ 毫米(Millimeter) 
      

  3.   

    document.all("aa").style.top=document.all("aa").style.top+30;
      

  4.   

    document.all("aa").style.top=document.all("aa").style.top+30;