请问HTTPS协议下如何得到IE里的TEXT内容?(240分)

  • 主题发起人 主题发起人 chf77
  • 开始时间 开始时间
C

chf77

Unregistered / Unconfirmed
GUEST, unregistred user!
在本论坛找到以下代码,该代码可以实现HTTP协议读取TEXT内容,
可HTTPS协议下又如何得到呢?我试过了,下边的不行哦,谢谢!
procedure TForm1.Button1Click(Sender: TObject);
var
ShellWindow: IShellWindows;
nCount: integer;
spDisp: IDispatch;
i,j: integer;
vi: OleVariant;
IE1: IWebBrowser2;
IDoc1: IHTMLDocument2;
iELC : IHTMLElementCollection ;
S2 : string;
HtmlInputEle : IHTMLInputElement;
begin
ShellWindow := CoShellWindows.Create;
nCount := ShellWindow.Count;

for i := 0 to nCount - 1 do
begin
vi := i;
spDisp := ShellWindow.Item(vi);
if spDisp = nil then continue;
spDisp.QueryInterface( iWebBrowser2, IE1 );
if IE1 <> nil then
begin
IE1.Document.QueryInterface(IHTMLDocument2,iDoc1);
if iDoc1 <> nil then
begin
ielc:=idoc1.Get_all;
for j:=0 to ielc.length-1 do
begin
Application.ProcessMessages;
spDisp := ielc.item(J, 0);
if SUCCEEDED(spDisp.QueryInterface(IHTMLInputElement ,HtmlInputEle))then
with HtmlInputEle do
begin
S2:=Type_;
S2:=UpperCase(S2);
if (Value<>'') and (S2='TEXT') or (S2='password') then
Memo2.Lines.Add(Value);
end;
end; //END FOR
end;
end;
end;
end;
 
没人会吗?
 

Similar threads

后退
顶部