1
111111
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TPostForm.WebBrowser1DocumentComplete(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant);
var
i:integer;
t:OleVariant;
begin
t := WebBrowser1.Document;
for i := 0 to t.all.length - 1 do
begin
if t.all.item(i).tagName = 'INPUT' then
begin
if t.all.item(i).name = '你要的edit名称' then
t.all.item(i).value = 你要的值;
if t.all.item(i).type = 'submit' then
begin
t.all.item(i).click;
exit;
end;
end;
end;
end;
当t.all.item(i).tagName = 'A' 时,不能得到t.all.item(i).name ,如何得知其名称呢?
const pDisp: IDispatch; var URL: OleVariant);
var
i:integer;
t:OleVariant;
begin
t := WebBrowser1.Document;
for i := 0 to t.all.length - 1 do
begin
if t.all.item(i).tagName = 'INPUT' then
begin
if t.all.item(i).name = '你要的edit名称' then
t.all.item(i).value = 你要的值;
if t.all.item(i).type = 'submit' then
begin
t.all.item(i).click;
exit;
end;
end;
end;
end;
当t.all.item(i).tagName = 'A' 时,不能得到t.all.item(i).name ,如何得知其名称呢?