开发者

JavaScript and dynamically creating objects

开发者 https://www.devze.com 2023-03-15 13:23 出处:网络
When you call document.createElement(...) on a particular document, does that newly created elem开发者_高级运维ent only apply to that original document, or can it be inserted into other accessible win

When you call document.createElement(...) on a particular document, does that newly created elem开发者_高级运维ent only apply to that original document, or can it be inserted into other accessible windows/document trees?


It can only be inserted in that document, but you can use adoptNode or importNode to make it accessible in a different document.

0

精彩评论

暂无评论...
验证码 换一张
取 消