Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ʹÓÃTWebBrowser×é¼þ±£´æÍøÒ³ÎªhtmlºÍmhtÎļþ ÊÕ²Ø

ʹÓÃTWebBrowser×é¼þ±£´æÍøÒ³ÎªhtmlºÍmhtÎļþ ÊÕ²Ø
Ò»¡¢±£´æÎªHTMLÎļþ
uses ActiveX;
...
procedure WB_SaveAs_HTML(WB : TWebBrowser; const FileName : string) ;
var
  PersistStream: IPersistStreamInit;
  Stream: IStream;
  FileStream: TFileStream;
begin
  if not Assigned(WB.Document) then
  begin
    ShowMessage('Document not loaded!') ;
    Exit;
  end;
  PersistStream := WB.Document as IPersistStreamInit;
  FileStream := TFileStream.Create(FileName, fmCreate) ;
  try
    Stream := TStreamAdapter.Create(FileStream, soReference) as IStream;
    if Failed(PersistStream.Save(Stream, True)) then ShowMessage('SaveAs HTML fail!') ;
  finally
    FileStream.Free;
  end;
end; (* WB_SaveAs_HTML *)
ʹÓ÷½·¨£º
WebBrowser1.Navigate('http://www.uufax.com') ;
//then save
WB_SaveAs_HTML(WebBrowser1,'c:\WebBrowser1.html') ;
¶þ¡¢Áí´æÎªMHTµ¥Ò»Îļþ
uses CDO_TLB, ADODB_TLB;
...
procedure WB_SaveAs_MHT(WB: TWebBrowser; FileName: TFileName) ;
var
  Msg: IMessage;
  Conf: IConfiguration;
  Stream: _Stream;
  URL : widestring;
begin
  if not Assigned(WB.Document) then Exit;
  URL := WB.LocationURL;
  Msg := CoMessage.Create;
  Conf := CoConfiguration.Create;
  try
    Msg.Configuration := Conf;
    Msg.CreateMHTMLBody(URL, cdoSuppressAll, '', '') ;
    Stream := Msg.GetStream;
    Stream.SaveToFile(FileName, adSaveCreateOverWrite) ;
  finally
    Msg := nil;
    Conf := nil;
    Stream := nil;
  end;
end; (* WB_SaveAs_MHT *)
ʹÓ÷½·¨£º
//first navigate
WebBrowser1.Navigate('http://www.uufax.com') ;
//then save
WB_SaveAs_MHT(WebBrowser1,'c:\WebBrowser1.mht') ;
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/sunstone/archive/2009/11/09/4788743.a


Ïà¹ØÎĵµ£º

HTML noscript ±êÇ©

HTML <noscript> ±êÇ©
¶¨ÒåºÍÓ÷¨
noscript ÔªËØÓÃÀ´¶¨ÒåÔڽű¾Î´±»Ö´ÐÐʱµÄÌæ´úÄÚÈÝ£¨Îı¾£©¡£
´Ë±êÇ©¿É±»ÓÃÓÚ¿Éʶ±ð <script> ±êÇ©µ«ÎÞ·¨Ö§³ÖÆäÖеĽű¾µÄä¯ÀÀÆ÷¡£
HTML Óë XHTML Ö®¼äµÄ²îÒì
NONE
ÌáʾºÍ×¢ÊÍ£º
×¢ÊÍ£ºÈç¹ûä¯ÀÀÆ÷Ö§³Ö½Å±¾£¬ÄÇôËü²»»áÏÔʾ³ö noscript ÔªËØÖеÄÎı¾¡£
×¢ÊÍ£ºÎÞ·¨Ê¶±ð ......

HTML label ±êÇ©


HTML <label> ±êÇ©
¶¨ÒåºÍÓ÷¨
<label> ±êǩΪ input ÔªËØ¶¨Òå±ê×¢£¨±ê¼Ç£©¡£
label ÔªËØ²»»áÏòÓû§³ÊÏÖÈκÎÌØÊâЧ¹û¡£²»¹ý£¬ËüΪÊó±êÓû§¸Ä½øÁË¿ÉÓÃÐÔ¡£Èç¹ûÄúÔÚ label ÔªËØÄÚµã»÷Îı¾£¬¾Í»á´¥·¢´Ë¿Ø¼þ¡£¾ÍÊÇ˵£¬µ±Óû§Ñ¡Ôñ¸Ã±êǩʱ£¬ä¯ÀÀÆ÷¾Í»á×Ô¶¯½«½¹µãתµ½ºÍ±êÇ©Ïà¹ØµÄ±íµ¥¿Ø¼þÉÏ¡£
<label> ± ......

HTML Table layout issue Draw a table

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test Page</title>
</head>
<body>
<table border="1px">
......

html select onchangeʼþ

<select name="CluefromType" id="CluefromType" style="width: 182px" onchange="return CluefromOtherTypeSelected();">
       <option value="Êг¡×ß·Ã">
        Êг¡×ß·Ã
       < ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ