Open GoogleCodeExporter opened 8 years ago
好吧,看了下相关的代码,用CSS切换加执行了一段啥代码。
你可以用如下代码:
var clickEvent = document.createEvent("MouseEvents");
clickEvent.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false,
false, false, false, 0, null);
var tabStr = "feedTabAttention"; //
特别关注,好友内容是"feedTabFriend"
document.getElementById(tabStr).dispatchEvent(clickEvent);
维护性会好很多,不用去跟人人网恶心的代码
Original comment by ayanamist
on 17 Apr 2013 at 3:57
未发现有失效现象。倒是模拟鼠标点击方法在我这里会失效��
�所以才换成现在的做法的
Original comment by xnrefor...@gmail.com
on 14 May 2013 at 2:47
Original issue reported on code.google.com by
ayanamist
on 17 Apr 2013 at 3:17