开发者

is there a way to capture creation and removal of element on web page? [duplicate]

开发者 https://www.devze.com 2023-03-28 13:30 出处:网络
This question already has answers here: JavaScript Event Listeners for when the DOM changes [duplicate]
This question already has answers here: JavaScript Event Listeners for when the DOM changes [duplicate] (3 answers) Closed 9 years ago.

is there a way to capture creatio开发者_StackOverflown and removal of element on web page. for example: listening to the body tag, I can capture what element is created and removed under it and having a callback to handle something else when these events happen. thanks for any advice.


Some browsers (read: not IE) support this through the DOMNodeInserted and DOMNodeRemoved events.


I think the jquery livequery plugin can do what you want.

0

精彩评论

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