【问题标题】:Is there an event checking if the 'innerText' property of HtmlElement has changed?是否有事件检查 HtmlElement 的“innerText”属性是否已更改?
【发布时间】:2014-09-16 05:58:15
【问题描述】:

我在 html 上运行 c# 的 WebBrowser 对象并获取 HtmlElement 的 innerText 属性。现在我想检查此 innerText 何时更改。 是否有一些 onChanged 事件可以做到这一点?

【问题讨论】:

  • 你有代码/小提琴要展示吗?

标签: c# html


【解决方案1】:

一个快速的谷歌给了我以下答案

$('#div').bind('DOMNodeInserted', function(event) {
   alert('change');
});

查看this fiddle

希望这会有所帮助。

【讨论】:

    【解决方案2】:

    我在 stackoverflow 上找到了这个 innerText Changed event 这可能会对你有所帮助。如果你想试试 MutationObserver.,也试试这个。

    【讨论】:

      猜你喜欢
      • 2013-06-14
      • 2019-10-12
      • 2021-12-21
      • 1970-01-01
      • 2018-09-13
      • 1970-01-01
      • 2011-06-30
      • 2011-03-04
      • 2020-07-07
      相关资源
      最近更新 更多