如何知道任何浏览器使用c#成功加载网页 [英] How to know webpage is successfully loaded by any browser using c#

查看:85
本文介绍了如何知道任何浏览器使用c#成功加载网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Is there any way to check a requested page is completely open by browser?

suppose i open www.google.com, it takes time to load completely on browser, Is there any way to know it is open completely?

推荐答案

您并不具体了解您的应用程序以及您正在做的事情,所以猜测一下您将获得的最佳效果。总的来说,根据应用程序类型,不能,您的代码无法知道页面是否在另一个进程(浏览器)中完全加载。
You're not specific about your application and exactly what you're doing, so a guess is about the best you're going to get. Overall, depending on application type, no, there is no way for your code to know if a page is completely loaded in another process (browser).


这是永远不需要的。如果您发现某些页面尚未完全加载,您会怎么做?相反,你应该处理这个事件。



特别是,你可以回复HTML体的 onload 事件:

http://www.w3schools.com/tags/ev_onload.asp [ ^ ],

< a href =http://www.w3schools.com/tags/tag_body.asp> http://www.w3schools.com/tags/tag_body.asp [ ^ ]。



最多由jQuery方便地处理: https://learn.jquery.com/about-jquery/how-jquery-works [ ^ ]。



如果你需要学习jQuery,你可以从这个页面开始(强烈推荐);另请参阅:

https://learn.jquery.com [ ^ ],

http ://api.jquery.com [ ^ ],
https://jquery.com [ ^ ]。



-SA
This is never needed. What would you do if you find that some page is not yet fully loaded. Instead, you should handle the event.

In particular, you can respond to the event onload of HTML body:
http://www.w3schools.com/tags/ev_onload.asp[^],
http://www.w3schools.com/tags/tag_body.asp[^].

It is most conveniently handled by jQuery: https://learn.jquery.com/about-jquery/how-jquery-works[^].

You can start with this page if you need to learn jQuery (highly recommended); see also:
https://learn.jquery.com[^],
http://api.jquery.com[^],
https://jquery.com[^].

—SA


这篇关于如何知道任何浏览器使用c#成功加载网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆