<div id="main">
<div id="abc">
<div>
This is the div to be replaced
</div>
</div>
<div id="xyz" style="display:none">
<div>
This is the div replaced
</div>
</div>
</div>
我给了它这样的
$('#main').children('div:eq(0)').css('display','none')
$('#main').children('div:eq(0)').replaceWith($('#xyz').html())
但是,如果我看到输出,我会<div>This is the div replaced</div>
单独得到它,而不是那个的父 div<div id="xyz">