开发者

mirror a html section

开发者 https://www.devze.com 2023-02-18 08:33 出处:网络
I would like to create an html page with a div that will contain the same content as another div. i want that any change in the origin will be reflected in the destination.

I would like to create an html page with a div that will contain the same content as another div. i want that any change in the origin will be reflected in the destination. Can you please help with: 1 - Which DOM events do I need to listen to? 2 - How do I apply the events to the d开发者_如何学编程estination?

I saw these events: DOMAttrModified, DOMNodeInserted, DOMNodeRemoved, DOMSubtreeModified but I don't know how to parse them.


JQuery has a .clone() function that would be helpful for this. Check it out here

0

精彩评论

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