procedure AutoLogin(iDoc1:IHTMLDocument2);
var
spDisp: IDispatch;
j: integer;
iELC : IHTMLElementCollection ;
S2,sn : string;
HtmlInputEle : IHTMLInputElement;
HTMLFormEle : IHTMLFormElement;
IF_Have:Boolean;
begin
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
begin
HTMLFormEle :=HtmlInputEle.form;
IF_Have:=true;
with HtmlInputEle do
begin
S2:=Type_;
S2:=UpperCase(S2);
if StrComp(PChar(S2),'TEXT')=0 then
begin
sn := name;
sn := UpperCase(sn);
if StrComp(PChar(sn),'U')=0 then
value :='12313';
end;
if StrComp(PChar(S2),'PASSWORD')=0 then
begin
sn := name;
sn := UpperCase(sn);
if StrComp(PChar(sn),'PSW')=0 then
value :='1213';
end;
end;
end;
end; //END FOR
if(IF_Have)then
HTMLFormEle.submit;
end;
end;
var
spDisp: IDispatch;
j: integer;
iELC : IHTMLElementCollection ;
S2,sn : string;
HtmlInputEle : IHTMLInputElement;
HTMLFormEle : IHTMLFormElement;
IF_Have:Boolean;
begin
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
begin
HTMLFormEle :=HtmlInputEle.form;
IF_Have:=true;
with HtmlInputEle do
begin
S2:=Type_;
S2:=UpperCase(S2);
if StrComp(PChar(S2),'TEXT')=0 then
begin
sn := name;
sn := UpperCase(sn);
if StrComp(PChar(sn),'U')=0 then
value :='12313';
end;
if StrComp(PChar(S2),'PASSWORD')=0 then
begin
sn := name;
sn := UpperCase(sn);
if StrComp(PChar(sn),'PSW')=0 then
value :='1213';
end;
end;
end;
end; //END FOR
if(IF_Have)then
HTMLFormEle.submit;
end;
end;