检测帧位置/内容已更改
我有以下情况。我有 2 个框架(顶部和底部)。上部框架监视下部框架中当前加载的页面。我如何知道用户是否更改了该框架的位置(网址)?所以我想知道用户何时按下该页面中的链接,该链接会转到某个地方。
我在这里发现了类似的内容: Detect element contentchanges with jQuery ,但它对我没有帮助(我认为)。
你能给我一些想法吗?
谢谢, Timotei
编辑:底部框架位于另一个域上,因此根据此: Jquery 权限被拒绝 - 不同的域名 是不可能的。
那么,换句话说,是否有任何方法可以使用任何其他浏览器内方法来“监视”用户浏览的页面?
I have the following situation. I have 2 frames (top and bottom). The upper frame monitors the current loaded page in the bottom frame. How can I know if the users changed the location of that frame (the url)? So I want to know when the user, press a link in that page, that goes somewhere.
I found something like this here: Detect element content changes with jQuery , but it doesn't help me (I think).
Could you give me some ideas?
Thanks,
Timotei
EDIT: The bottom frame is on another domain, so according to this: Jquery permission denied - different domain name is not possible.
So, to put it other way, is there any method to "monitor" the pages a users surfs, using any other in-browser method?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您也许可以存储 iframe 的位置,然后创建一个间隔来查看 SRC 是否已更改。
希望它有效:)
You maybe can store the location of the iframe, then create a interval that will look if the SRC has changed.
Hope it works :)