试试?
name1.style.top = parseInt(body.clientWidth) - parseInt(name2.style.width)+"px";

解决方案 »

  1.   

    因为……
    你这样作就好像是:  600px - 100px = ??
    明白了吧 :)
      

  2.   

    document.all.name1.style.top = document.body.clientWidth - document.all.name2.clientWidth
      

  3.   

    body.clientWidth - name2.style.posWidth
      

  4.   

    why top? should be left?name1.style.posLeft = body.clientWidth - name2.style.posWidth
      

  5.   

    为什么要给<body>加id,要加就加个步会出错的 
    name1.style.top =document.body.clientWidth - name2.style.width
      

  6.   

    若是IE,前面加
    with(document.all)
      

  7.   

    expression(..)---------
    天天学习,好好向上
    www.51windows.com