var the = document.createElement( "SPAN" );
document.all[ "parent" ].appendChild( the )
the.innerText = "dd" ;

解决方案 »

  1.   

    不是添加一个新的child,而是修改parent.innerText后,child 不显示了
      

  2.   

    document.getElementById ("parent").innerText += document.getElementById ("parent").innerText+$append
    $append就是你要加入的东西。
      

  3.   

    楼主,偶没有明白你的意思.
    你设置innerText,不是本身已经把child给删掉了吗?又何来让其不显示一说呢.
      

  4.   

    child本身就属于innerText里面的一部分
    被你咔嚓了
    还想要人家变出来见你啊。。
      

  5.   

    function a(){
        document.getElementById ("parent").innerText='dd'+'<span  id="child" style="WIDTH:100px;HEIGHT:80px;VISIBILITY: visible;border: 1 solid #C0C0C0;">00000</span>';
    }
      这样不就得了。在你改变innerText时,将child div的内容也附上。
     可能引号需要调整一下,大体就这样的