如何在ajax实现后重新加载数据 [英] How do I reload data after ajax has actualize
问题描述
您好编码员:-)
我有一点问题,但我不知道如何解决...
我自己创建了一个webbrowser,我想在页面加载时检查一些东西。我使用文档完成事件来做到这一点。但是在加载页面后,ajax可以更新数据,应该识别此更改。我不知道如何将内容更改为html div。
我尝试了很多谷歌搜索的代码,但我没有发现代码巫婆的作品:-)
请帮帮我:-)
这么长的phil
ps:框架4.5,如果有必要,webbrowser接缝为ie11 :-)
我尝试了什么:
Hello coders :-)
I have a little problem, but I don't know how to fix...
I made a webbrowser by my own cause I want to check some stuff when page is loaded. I do that with the "document complete" event. But after page is loaded the ajax can renew data, this changes should be recognized. I don't know how to make an event to the "html div" with content is changed.
I tried a lot of code from google search but I didn't found the code witch works :-)
Please help me :-)
so long phil
ps: framework 4.5, webbrowser seams to be ie11 if it's necessary :-)
What I have tried:
HTMLDocument doc = (HTMLDocument)webBrowser1.Document.DomDocument;
IHTMLElement2 div_result = (IHTMLElement2)doc.getElementById("inhalt");
HTMLElementEvents2_Event events = (HTMLElementEvents2_Event)div_result;
events.ondatasetchanged += new HTMLElementEvents2_ondatasetchangedEventHandler(UpdatedHandler);
推荐答案
你可能想要使用ajax完全挂钩
.ajaxComplete()| jQuery API文档 [ ^ ] [ ^ ]
一个例子playarounds
Tryit Editor v3.5 [ ^ ]
You propably want to use the ajax complete hook-in
.ajaxComplete() | jQuery API Documentation[^][^]
an example with playarounds
Tryit Editor v3.5[^]
这篇关于如何在ajax实现后重新加载数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!