IE6 / IE7中的appendChild不适用于现有元素 [英] appendChild in IE6/IE7 does not work with existing elements
问题描述
flex.utils.get('oPopup_About')。appendChild(flex。 utils.get( 'oUpdater_About'));
但是,IE,那么,IE,它不起作用。它的作品是所有其他浏览器,只是不在IE中。
我需要这样做,因为元素(div)'oUpdater_About'需要要重复使用,因为它一直在填充。
所以我只需要能够移动DOM在DOM附近,appendChild将让所有浏览器发生这种情况,但是,IE。
提前感谢
先删除节点,然后再将其附加到其他位置。
一个节点不能同时在两个地方。
var node = flex.utils.get('oUpdater_About')
node.parentNode.removeChild(node);
flex.utils.get('oPopup_About')。appendChild(node);
I have a div that needs to be moved from one place to another in the DOM. So at the moment I am doing it like so:
flex.utils.get('oPopup_About').appendChild(flex.utils.get('oUpdater_About'));
But, IE, being, well, IE, it doesn't work. It works all other browsers, just not in IE.
I need to do it this way as the element (div) 'oUpdater_About' needs to be reused as it is populated over and over.
So i just need to be able to move the div around the DOM, appendChild will let this happen in all browsers, but, IE.
Thanks in advance!
You have to remove the node first, before you can append it anywhere else. One node cannot be at two places at the same time.
var node = flex.utils.get('oUpdater_About')
node.parentNode.removeChild(node);
flex.utils.get('oPopup_About').appendChild(node);
这篇关于IE6 / IE7中的appendChild不适用于现有元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!