日期:2014-05-16 浏览次数:20392 次
document.getElementById("nn").innerHTML = ""; var child= document.getElementById("mm"); document.getElementById("nn").innerHTML=child.innerHTML;
------解决方案--------------------
我的是IE6.0,显示很正常
<html > <head > <meta http-equiv="Content-Type" content="text/html; charset=gb2312" > <title > </title > </head > <body > <div id="mm" style="display:none" > <input name="t2" type="text" id="t2" / > <select name="t1" id="t1" > <option selected="selected" value="1" >a </option > <option value="2" >b </option > <option value="3" >c </option > </select> </div > <input type="button" onclick="getDiv()" value="显示" /> <div id="nn" style="background-color:Lime">nn </div > </body > </html > <script language="javascript" type="text/javascript" > function getDiv() { document.getElementById("mm").style.display="block"; document.getElementById("nn").appendChild(document.getElementById("mm")); } </script >