function SetSize() {
                document.all.wsMain.height = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);            }因挡住,想让document.all.wsMain.height 在这基础上再少20px,这段javascript应该如何写?谢谢!

解决方案 »

  1.   

    document.all.wsMain.height = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - 20;
      

  2.   


    function SetSize() {
        document.all.wsMain.height = (Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - 20) + 'px';}
      

  3.   

    document.getElementById('wsMain').style.height = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - 20 + 'px';最好这样写
      

  4.   

    document.all.wsMain.height = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - 20; //这样?
      

  5.   


    function SetSize() {
      var h = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight)
      document.all.wsMain.height = h-20  或者h - 20 +'px';  //这样???
      }