var
i, j, len: integer;
elec: IHTMLElementCollection;
doc: ihtmldocument2;
chele: IHTMLElement;
InputElement: IHTMLInputElement;
FormElement: IHTMLFormElement;
FormCollection: IHTMLElementCollection;
Element1: IHTMLElement;
SelectElement: IHTMLSelectElement;
begin
doc := webbrowser1.document as IHtmlDocument2;
elec := doc.all;
for i := 0 to elec.length - 1 do
begin
chele := elec.item(i, emptyparam) as IHTMLElement;
if chele.tagname = 'INPUT' then
begin
InputElement := elec.item(i, emptyparam) as IHTMLInputElement;
if InputElement.name = 'pageno' then
InputElement.value := '10';
end;
end;
这是部分代码,把叫pageno的<input...>赋值10
if chele.tagname = 'FORM' then
begin
FormElement := elec.item(i, emptyparam) as IHTMLFormElement;
if FormElement.name = 'freshlist' then
begin
FormElement.submit;
end;
end;
这是部分代码,提交表单freshlist
--------------
还有直接用WebBrowser1.OleObject....但这种方法无帮助,用上面的方法可以到MSDN查找