如何从 BHO 捕获 URL 的变化?

发布于 2024-10-03 10:32:56 字数 198 浏览 0 评论 0原文

如何从浏览器帮助程序对象捕获 IE 上 URL 的更改?

一种明显的方法是使用任何常见的浏览器事件,例如 onbeforenavigate,但如何捕获更改,例如:

url.com#hello

更改为

url.com#byebye

这种更改是否会触发 Internet Explorer 上的任何事件?

How can I capture a change in the URL on IE from a Browser Helper Object?

An obvious way would be to use any of the common browser events such as onbeforenavigate, but how to capture a change like:

url.com#hello

changes to

url.com#byebye

Does this kind of change triggers any event on Internet Explorer?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吻安 2024-10-10 10:32:56

onhashchange 事件仅在 IE8 中引入,因此您必须检查计时器上的位置以处理 url 更改。

onhashchange event introduced only in IE8, so you must check location on timer to handle url changes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文