不要对表格使用innerHTML,请使用insertRow,insertCell等
详细介绍和例子参见http://msdn.microsoft.com/workshop/author/tables/buildtables.asp
http://www.cnblogs.com/waxdoll/archive/2005/04/18/140049.html

解决方案 »

  1.   

    老大好 久仰!
    我是想把TR插入到<span id="ResultSB">&nbsp;</span>这个里边
      

  2.   

    就是牛啊,果然用insert可以哈哈~
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title></title>
    <script>
    function onTwiClick(obj){
       var con=obj.cells;
       var tbody=document.getElementById("result");
       tbody.insertRow(0);
       tbody.rows[0].style.backgroundColor="#f7f3f7";
       for(var i=0;i<con.length;i++){
       
        tbody.rows[0].insertCell(i).innerText=con[i].innerText;
    }
      
    }
    </script>
    </head>
    <body bgcolor="#42A6E7">
    <form name="" method="post" action="">
      <div style="border-style:solid;">
        <table cellpadding="0" cellspacing="1">
          <tr id='0'  ondblclick='onTwiClick(this)' bgcolor='#F7F3F7'>
            <td nowrap='nowrap' style=''>10</td>
            <td nowrap='nowrap' style='display:block;'>0000000</td>
            <td nowrap='nowrap' style='display:block;'>000000000000</td>
          </tr>
          <tr id='1'  ondblclick='onTwiClick(this)' bgcolor='#F7F3F7'>
            <td nowrap='nowrap' style=''>11</td>
            <td nowrap='nowrap' style='display:block;'>0000000</td>
            <td nowrap='nowrap' style='display:block;'>000000000000</td>
          </tr>
        </table>
      </div>
      <div style="border-style:solid;">
        <table cellpadding="0" cellspacing="1">
              <tbody id="result"></tbody>
        </table>
      </div>
    </form>
    </body>
    </html>
      

  3.   

    明白了 本来还想 不行就用AJAX的 
    谢谢指教!
      

  4.   

    Ajax和你的这个功能有什么联系?
      

  5.   

    Click the link to solve your problem.Good luck!