在 VBScript 中,有没有办法判断 IE 是否正忙于加载某些内容(例如页面或 XHR)?
我正在编写一个 HTML 应用程序 (HTA),该应用程序全屏运行并允许用户浏览选定网站的列表。我注意到,有时当您单击链接加载外部网站时,没有向用户反馈浏览器已接受请求并开始尝试加载页面。
在 Internet Explorer 中,您会在活动选项卡中看到一个旋转的小图标,并在通知区域中看到一个进度条,以指示浏览器正在加载某些内容。我想在我的 HTA 中包含此功能。
我尝试过的事情:
网站列表显示在屏幕顶部的菜单中,用户正在浏览的网站显示在其下方的 iframe 中。我尝试使用 Internet Explorer 的 onreadystatechange
事件来检测 iframe 的位置何时发生变化,但我注意到,readyState 不会立即更改为 "loading"
单击链接 - 它似乎只有在收到服务器返回的响应后才会触发。因此,如果服务器需要 5 秒来响应某些内容,则 HTA 似乎在 5 秒内没有执行任何操作。
有什么想法吗?感谢您花时间阅读本文并回复 =)
亲切的问候
-Iain
I am writing an HTML Application (HTA) that runs fullscreen and allows users to browse a list of selected websites. I notice that sometimes when you click on link to load an external website, there is no feedback to the user that the browser has accepted the request and has started trying to load the page.
In Internet explorer, you get a little rotating favicon in the active tab and a progress bar in the notification area to indicate that the browser is loading something. I would like to include this functionality in my HTA.
Things I have tried:
The list of websites appears in a menu at the top of the screen and the website the user is browsing appears in an iframe below that. I've tried using Internet Explorer's onreadystatechange
event to detect when the iframe's location changes, but I've noticed that the readyState doesn't change to "loading"
as soon as the link is clicked - it seems to fire only after it receives a response back from the server. So if the server takes 5 seconds to respond with something, then the HTA appears to be sitting there doing nothing for 5 seconds.
Any ideas? Thanks for taking the time to read this and respond =)
Kind regards
-Iain
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我建议您使用
ReadyState
而不是 'Busy'I would suggest you to use
ReadyState
rather than 'Busy'也许:
Perhaps: