技术需求:
当Div内容发生变化生,需要监听事件,并执行指定的方法。
代码分解:
# wb_follow_btn,是Div的id
DOMNodeInserted,绑定监听方法
完整代码:
$ (" # wb_follow_btn ")。绑定(DOMNodeInserted,函数(e) {,,,
,,警报(“元素现在包含:”+ $ (e。target) . html ());,
});
技术需求:
当Div内容发生变化生,需要监听事件,并执行指定的方法。
代码分解:
# wb_follow_btn,是Div的id
DOMNodeInserted,绑定监听方法
完整代码:
$ (" # wb_follow_btn ")。绑定(DOMNodeInserted,函数(e) {,,,
,,警报(“元素现在包含:”+ $ (e。target) . html ());,
});