alert(window.info1.innerHTML);
==>
res = eval("document.all."+infol+".innerHTML");
alert(res);这样子试试看。

解决方案 »

  1.   

    to keaizhong:
    一样提示info1未定义
    :(
      

  2.   

    res = eval(document.getElementbyId("L1"+a).innerText);//why do you have to use innerHTML
    alert(res);
      

  3.   

    sorry
    res = eval(document.getElementById("L1"+a));
    alert(res.innerText);
    alert(res.innerHTML);
      

  4.   

    TO springwood:
       It is the same fault as innerHTML, I have got the valuse by cell. I just wonder why is no smooth when use innerHTML.
       thank you a lot. :)
      

  5.   

    <script>function getid(a){
      var obj=document.all["L1"+a];
     alert(obj.innerHTML);
    }
    </script>
      

  6.   

    你这样获取的只是一个字符串而不是一个对象,不过其他人也给出了答案,用eval把
      

  7.   

    can you please paste all the source code here?
      

  8.   

    <script>
    var info1;
    function getid(a){
     info1="L1"+a;
     alert(info1);
     alert(window.innerHTML=info1);
    }
    </script>这样试一下~~~~