Delphi打开IE浏览器,打开百度首页后,自动输入关键词"商务宾馆",继而点击提交,跳到搜索页面。这个过程怎么实现?
ShellExecute(Handle, 'open', 'IExplore.EXE', 'http://www.baidu.com/', nil, SW_SHOWNORMAL);
ShellExecute(Handle, 'open', 'IExplore.EXE', 'http://www.baidu.com/', nil, SW_SHOWNORMAL);
调试欢乐多
然后就可以模拟输入,提交.....
procedure TForm1.Button2Click(Sender: TObject);
begin
wb1.OleObject.document.all.item('wd').value:='搜索类容;
wb1.OleObject.document.all.item('sb').click;//点击
end;
具体参考该组件
http://code.google.com/p/nadesiko/source/browse/trunk/vnako_unit/UIWebBrowser/MSHTMLParser.pas?spec=svn3&r=3