用于检查页面何时完成加载的代码
如何检查页面是否加载完成?如果有,我如何执行已在该页面后面的 C# 代码中创建的方法?
我想编排以下事件序列
- 完成加载页面
- 在页面中下载 gridview 作为 Excel 文件
- 调用此方法
download()
- 关闭浏览器
如何完成此操作?
How can I check whether the page has finished loading? When it has, how can I execute a method already created in the C# code behind for that page?
I would like to orchestrate the following sequence of events
- Finish Loading the page
- Download a gridview as an Excel file in the page
- Call this method
download()
- Close the browser
How can I accomplish this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
此链接可以回答您的问题吗?
示例用法(在您的 C# 代码中)
Does this link answer your question?
Example usage (in your C# code)
使用 JQuery 并进行回调以打开 xls 文件。
这里有一些详细的解决方案 POST 到服务器,接收PDF,使用 jQuery 交付给用户
基本上你可以挂接到
Use JQuery and make a callback to open the xls file.
There is a few solutions detailed here POST to server, receive PDF, deliver to user w/ jQuery
Basically you can hook into the
你可以在 DOM javascript 中做到这一点:
You can do it in DOM javascript: