真给分吗?
TDHTMLEVENTHANDLER控件一个,ZIP代码一个
D4下PASS
可EMAIL to you
部分代码:
procedure TForm1.btnHookClick(Sender: TObject);
var
i: Integer;
sHREF: string;
vDoc, vLinks, vLink, vData: Variant;
begin
vDoc := IE.ControlInterface.Document;
vLinks := vDoc.links;
for i := 0 to vLinks.length - 1 do begin
vLink := vLinks.item(i);
sHREF := vLink.HREF;
vData := MakeUpURLInfo(sHREF);
MouseOver.Add(vLink, 'onmouseover', vData);
MouseOut.Add(vLink, 'onmouseout', Null);
Memo1.Lines.Add(Format('#%d. Hooked "%s"', [i+1, sHREF]));
end;
btnUnhook.Enabled := True;
btnHook.Enabled := False; // can't hook more than once!
btnLoad.Enabled := False; // shouldn't reload unless unhooked!
end;