C
cooldren
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, OleCtrls, SHDocVw, ActiveX;type TForm1 = class(TForm) wb: TWebBrowser; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);var str:string; StrStream:TStringStream;begin str:='<html><head></head><body>';// str:=str+'<a href="file:///E|/新版/林肯.jpg">'; str:=str+'<a href="E:/新版/林肯.jpg">'; str:=str+'<img src="file:///E|/新版/林肯.jpg" id="bigimg" width="160" alt="林肯.jpg" border="0"></a>'; str:=str+'</body></html>'; WB.Navigate('about:blank'); StrStream:=TStringStream.Create(pchar(str)); try StrStream.Position:=0; (WB.Document as IPersistStreamInit).Load(TStreamadapter.Create(StrStream)); finally StrStream.Free; end;end;end.写到webbrowser 中后, 超连接打不开请问是怎么回事,高手帮忙