获取网页内容失败,求大神帮忙!
delphi吧
全部回复
仅看楼主
level 2
嶙峋215 楼主
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, OleCtrls, SHDocVw;
type
TForm1 = class(TForm)
WebBrowser1: TWebBrowser;
Panel1: TPanel;
Button2: TButton;
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
var
mes:String;
begin
WebBrowser1.Navigate(*http://www.renren.com*);
mes:=WebBrowser1.OleObject.document.getElementByID(*reg_link*).InnerHtml ;
ShowMessage(*mes*);
end;
end.
输出结果为空,求指导,谢谢!
2014年10月27日 14点10分 1
level 2
嶙峋215 楼主
[呵呵],谢谢
2014年11月23日 05点11分 3
1