Y
yifeng
Unregistered / Unconfirmed
GUEST, unregistred user!
var
i,j,len:integer;
elec:IHTMLElementCollection;
doc:ihtmldocument2;
begin
doc:= webbrowser1.document as IHtmlDocument2;
elec:= doc.all;
for i:= 0 to elec.length-1 do begin
memo1.lines.add(IHTMLElement(elec.item(i,emptyparam)).tagname);
end;
end;
却得到了Access violation
elec.item(i,emptyparam) 到底该怎么用?
i,j,len:integer;
elec:IHTMLElementCollection;
doc:ihtmldocument2;
begin
doc:= webbrowser1.document as IHtmlDocument2;
elec:= doc.all;
for i:= 0 to elec.length-1 do begin
memo1.lines.add(IHTMLElement(elec.item(i,emptyparam)).tagname);
end;
end;
却得到了Access violation
elec.item(i,emptyparam) 到底该怎么用?