【发布时间】:2012-04-04 12:14:36
【问题描述】:
Ext 中是否有一种很好的方式来移动 DOM 中的元素?我想将元素 'iShouldBeInsideTheBox' 移动到 'box' 元素内,然后回到它在两个 p 元素之间的原始位置:
<p>
surrounding text
</p>
<p id="iShouldBeInsideTheBox">
This should be inside the box
</p>
<p>
surrounding text
</p>
<p id="box">
Some content in the box
</p>
我在 jQuery 中花了四行代码(小提琴:http://jsfiddle.net/F2PXw/19/),但我想不出在 Ext(或纯 JS,如果它可靠的话)中做到这一点的简单方法。
【问题讨论】:
标签: javascript dom extjs dom-manipulation