跳转到:

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译
您也可以阅读此文章的English (US)版。

Example

The following code will display the time of last DOM Change on the title bar of the page.

This event has been deprecated in favor of the Mutation Observer API

This event can cause infinite loops if you decide to change the DOM inside the event handler, hence it has been disabled in a number of browsers (see
DOMAttrModified and DOMSubtreeModified events are no longer fired when style attribute is changed via CSSOM for example).
document.body.addEventListener('DOMSubtreeModified', function () {
  document.title = 'DOM Changed at ' + new Date();
}, false);

文档标签和贡献者

最后编辑者: mdnwebdocs-bot,