【发布时间】:2014-09-16 05:58:15
【问题描述】:
我在 html 上运行 c# 的 WebBrowser 对象并获取 HtmlElement 的 innerText 属性。现在我想检查此 innerText 何时更改。 是否有一些 onChanged 事件可以做到这一点?
【问题讨论】:
-
你有代码/小提琴要展示吗?
我在 html 上运行 c# 的 WebBrowser 对象并获取 HtmlElement 的 innerText 属性。现在我想检查此 innerText 何时更改。 是否有一些 onChanged 事件可以做到这一点?
【问题讨论】:
一个快速的谷歌给了我以下答案
$('#div').bind('DOMNodeInserted', function(event) {
alert('change');
});
查看this fiddle。
希望这会有所帮助。
【讨论】:
我在 stackoverflow 上找到了这个 innerText Changed event 这可能会对你有所帮助。如果你想试试 MutationObserver.,也试试这个。
【讨论】: