这地方不能这么用
改成
document.getElementById("tableid"+[7*(bbb-1)+aaa]).innerText

解决方案 »

  1.   

    getElementById根据id得到对象,返回的是一个对象~
      

  2.   

    就是通过对象的ID来得到对象,并且符合W3C标准
    下面是微软的MSDN上写的
    getElementById Method  Internet Development Index --------------------------------------------------------------------------------Returns a reference to the first object with the specified value of the ID attribute.SyntaxoElement = document.getElementById(sIDValue)
    ParameterssIDValue Required. String that specifies the value of an ID attribute. Return ValueReturns the first object with the same ID attribute as the specified value.ResIf the ID value belongs to a collection, the getElementById method returns the first object in the collection.ExampleThis example uses the getElementById method to return the first occurrence of the ID attribute value, oDiv.<SCRIPT>
    function fnGetId(){
       // Returns the first DIV element in the collection.
       var oVDiv=document.getElementById("oDiv1");
    }
    </SCRIPT>
    <DIV ID="oDiv1">Div #1</DIV>
    <DIV ID="oDiv2">Div #2</DIV>
    <DIV ID="oDiv3">Div #3</DIV>
    <INPUT TYPE="button" VALUE="Get Names" onclick="fnGetId()">