日期:2014-05-16  浏览次数:20336 次

innerHTML赋值丢失对象
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 "   />
<title> </title>
<script>
function   onTwiClick(obj){
        var   place   =   obj.all[0].innerText;
        var   expstr,start,end;
        expstr   =   " ";
        start   =   " <tr   id= ' "   +   obj.all[1].innerText   +   " '   bgcolor= '#F7F3F7 '> ";
        end   =   " </tr> ";
        expstr   =   start   +   obj.innerHTML   +   end;
        oldexp   =   document.getElementById( "ResultSB ").innerHTML;
        document.getElementById( "ResultSB ").innerHTML   =  
                                                                                                    oldexp   +   " <br> "   +   expstr;
}
</script>
</head>
<body   bgcolor= "#42A6E7 ">
<form   name= " "   method= "post "   action= " ">
    <div   style= "border-style:solid; ">
        <table   cellpadding= "0 "   cellspacing= "1 ">
            <span   id= "ResultSA ">
            <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>
            </span>
        </table>
    </div>
    <div   style= "border-style:solid; "> <