这种问题肯定用MSHTML了.
var
I:Integer;
Doc:IHTMLDocument2;
Edit:IHTMLInputElement;
begin
Doc:=WebBrowser1.Document as IHTMLDocument2;
for I:=1 to Doc.all.length-1 do
if Supports(Doc.all.item(EmptyParam,I),IHTMLINputElement) then
begin
Edit:=Doc.all.item(EmptyParam,I) as IHTMLInputElement;
Edit.value:='你好';
end;
end;