unit1.~pas

来自「《Delphi 7应用编程150例》源码(全)」· ~PAS 代码 · 共 39 行

~PAS
39
字号
unit Unit1;

interface

uses
  SysUtils, Classes, HTTPApp;

type
  TWebModule1 = class(TWebModule)
    procedure WebModule1WebActionItem1Action(Sender: TObject;
      Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  WebModule1: TWebModule1;

implementation

{$R *.dfm}

procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
  Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
    html:string;
begin
    html:='<html>';
    html:=html+'<body>';
    html:=html+'<h1>你好,这里是一个示范用的网页</h1>';
    html:=html+'<p>这个程序编写的时间是2000年八月</p>';
    html:=html+'</body>';
    html:=html+'</html>';
    response.content:=html;
end;
end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?