是否可以使用BHO(IE8)跟踪用户点击的链接 [英] Is it possible to use a BHO (IE8) to track which links a user clicks

查看:99
本文介绍了是否可以使用BHO(IE8)跟踪用户点击的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

阅读关于BHO的信息,我知道我可以看到您可以跟踪用户导航的方式 - 但是 - 是否可以通过BHO识别用户点击了哪个链接(例如,如果页面上存在两个链接)用户可以单击以导航到目标a - 是否可以确定实际单击了哪个链接?

Reading about BHOs and I know I can see ways in which you can track a user's navigation - however - is it possible with a BHO to identify which link was clicked by a user (for instance - if two links exist on a page in which a user can click to navigate to destination a - is it possible to determine which link was actually clicked)?

推荐答案

你可以接收DISPID_HTMLELEMENTEVENTS2_ONCLICK事件如果您可以访问这些元素(有时您不会像其他域中的框架中的元素那样)

You can sink the DISPID_HTMLELEMENTEVENTS2_ONCLICK event if you can get access to the elements (sometimes you don't such as elements in a frame in another domain)

哦,记得在BeforeNavigate2中分离你的事件。

Oh, and remember to detach your events in BeforeNavigate2.

一个问题是没有可靠的方法来检测页面刷新以重新连接事件或处理从脚本生成的元素(Ajax)。

An issue is there is no reliable way to detect a page refresh to reconnect the events or handle elements generated from scripts (Ajax).

这篇关于是否可以使用BHO(IE8)跟踪用户点击的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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