5,392
社区成员
发帖
与我相关
我的任务
分享
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,HttpApp,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
procedure FormShow(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormShow(Sender: TObject);
begin
Edit1.Text:='http://img21.imgtn.bdimg.com/it/u=2964593467,576387895&fm=21&gp=0.jpg';
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
edit2.Text:=HttpEncode(UTF8Encode(Edit1.text));
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
edit3.Text:=UTF8Decode(HttpDecode(edit2.Text));
end;
end.