如何检测何时在asp.net页中加载了所有内容? [英] How to detect when everything is loaded in an asp.net page ?

查看:96
本文介绍了如何检测何时在asp.net页中加载了所有内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在asp.net页上的所有内容加载完毕后做一些事情.所以我在javascript中尝试了window.load,在jquery中尝试了document.ready,但没有做到我想要的.还有其他建议吗?

谢谢.

解决方案

[ ^ ]可能会有所帮助.

如果您使用jQuery document.ready进行阅读,您会发现这是您真正需要的:
http://docs.jquery.com/How_jQuery_Works#Complete_Example [ http://api.jquery.com/ready/ [;据说:以这种方式绑定的就绪处理程序将在上述其他三种方法的任何绑定之后执行."

考虑到这是处理的最后机会.但是,我认为应该检查一下您的逻辑.您它没有做我想要的事情"不是很有益.您的问题可能在其他地方.

—SA


Hi ,

I want to do something when everything has finished loading in an asp.net page. So i tried window.load in javascript and document.ready in jquery but did not do what i want. So any other suggestion ?

Thanks.

This[^] might help.


If you read on jQuery document.ready, you will see that this is what you really need:
http://docs.jquery.com/How_jQuery_Works#Complete_Example[^],
http://api.jquery.com/ready/[^].

Look at the last reference article above. See also


(document).bind("ready", handler); it is said: "Ready handlers bound this way are executed after any bound by the other three methods above".

Consider this is a very last chance to handle. However, I would assume your logic should be checked up. You "it did not do what I want" is not quite informative. Your problem could be somewhere else.

—SA


这篇关于如何检测何时在asp.net页中加载了所有内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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