O
ooooh
Unregistered / Unconfirmed
GUEST, unregistred user!
[blue]以下程序中,button1.click获取代码出错,button2.click则正常.不知是网站的原因还是什么? 以前是正常的,只是近一段时间才有的错误.[/blue]
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP, StdCtrls;
type
TForm1 = class(TForm)
Memo1: TMemo;
Memo2: TMemo;
Button1: TButton;
IdHTTP1: TIdHTTP;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
memo1.Text:=idhttp1.Get( 'http://www.zhcw.com/data-js/nowdata98.js ');
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
memo2.Text:=idhttp1.Get( 'http://result.lottery.gov.cn/qxcpl3.js ');
end;
end.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP, StdCtrls;
type
TForm1 = class(TForm)
Memo1: TMemo;
Memo2: TMemo;
Button1: TButton;
IdHTTP1: TIdHTTP;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
memo1.Text:=idhttp1.Get( 'http://www.zhcw.com/data-js/nowdata98.js ');
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
memo2.Text:=idhttp1.Get( 'http://result.lottery.gov.cn/qxcpl3.js ');
end;
end.