打印本文 打印本文 关闭窗口 关闭窗口
直接在WebBrowser中显示字符串
作者:武汉SEO闵涛  文章来源:敏韬网  点击数944  更新时间:2009/4/23 18:44:18  文章录入:mintao  责任编辑:mintao

//江雪 2001.06  http://asnowcn.at.china.com
//直接在WebBrowser中显示字符串
procedure ShowInWebBrowser(WebB:TWebBrowser;Str:String);
var
 v: Variant;
 HTMLDocument: IHTMLDocument2;
begin
 HTMLDocument := WebB.Document as IHTMLDocument2;
 if (assigned(HtmlDocument)) then  begin
   v := VarArrayCreate([0, 0], varVariant);
   v[0] := str; //that is to be shown
   HTMLDocument.Write(PSafeArray(TVarData(v).VArray));
   HTMLDocument.Close;
 end;
end;

打印本文 打印本文 关闭窗口 关闭窗口