谁有IHTMLDocument2接口的定义?
如何用程序获取网页源码?
如何用程序获取网页源码?
解决方案 »
- Indy10 IdTCPClient 控件向 Server时,如果要发送的数据包含#10时怎么处理??
- SQL查询后赋值问题!
- 一个数据备份的奇怪问题。请教啊!给我今年一个完美的句号吧!
- 请各位高手帮忙告之小妹,如何才能把做好的工程生成一个.exe的文件?
- 请教一条SQL的写法
- 请问怎么样从不同的服务器端获取存储过程的脚本?(要求用一个统一的方法)
- 请教如何根据DBGRID中的数据来创建数据表?
- 有关恢复硬盘主引导记录区(MBR)的问题
- 各位大哥,小弟在这里多谢了.
- 如果在程序使用COM接口,在USE要用到什么吗?
- 请问Delphi有像msdn这样的帮助的东东吗?
- 如何获取sqlserver服务器上的所有视图列表?
DELPHI怎么用不知
UP
var
Document: IHtmlDocument2;
Link: IHTMLElement; StrLinks: string;
i: integer;
begin
Document := WebBrowser1.Document as IHTMlDocument2;
if myLst.Count > 0 then myLst.Clear;
for i := 0 to Document.Links.Length - 1 do
begin
Link := Document.Links.Item(i, 0) as IHTMLElement;
StrLinks := Link.toString;
if Pos('http://www.5460.net/txl/liuyan/liuyanSql.pl', StrLinks) > 0
then
begin
urlLiao := StrLinks;
myLst.Add(urlLiao);
edit1.Text := urlLiao;
isFind := True;
// Application.ProcessMessages;
// WebBrowser1.Navigate(edit1.Text);
// Memo1.Lines.Add('success at ' + DateTimeToStr(now));
//Exit;
end;
end;
try
for I := 0 to myLst.Count - 1 do
begin
WebBrowser1.Navigate(myLst.Strings[I]);
AddMsg('link to ' + myLst.Strings[I]);
Delay(5000);
end;
except
On e:Exception do AddMsg(E.Message);
end;
end;
网页源码:
IHtmlDocument2(WebBrowser1.Document).Body.OuterHtml
// *********************************************************************//
// Interface: IHTMLDocument2
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {332C4425-26CB-11D0-B483-00C04FD90119}
// *********************************************************************//
IHTMLDocument2 = interface(IHTMLDocument)
['{332C4425-26CB-11D0-B483-00C04FD90119}']
function Get_all: IHTMLElementCollection; safecall;
function Get_body: IHTMLElement; safecall;
function Get_activeElement: IHTMLElement; safecall;
function Get_images: IHTMLElementCollection; safecall;
function Get_applets: IHTMLElementCollection; safecall;
function Get_links: IHTMLElementCollection; safecall;
function Get_forms: IHTMLElementCollection; safecall;
function Get_anchors: IHTMLElementCollection; safecall;
procedure Set_title(const p: WideString); safecall;
function Get_title: WideString; safecall;
function Get_scripts: IHTMLElementCollection; safecall;
procedure Set_designMode(const p: WideString); safecall;
function Get_designMode: WideString; safecall;
function Get_selection: IHTMLSelectionObject; safecall;
function Get_readyState: WideString; safecall;
function Get_frames: IHTMLFramesCollection2; safecall;
function Get_embeds: IHTMLElementCollection; safecall;
function Get_plugins: IHTMLElementCollection; safecall;
procedure Set_alinkColor(p: OleVariant); safecall;
function Get_alinkColor: OleVariant; safecall;
procedure Set_bgColor(p: OleVariant); safecall;
function Get_bgColor: OleVariant; safecall;
procedure Set_fgColor(p: OleVariant); safecall;
function Get_fgColor: OleVariant; safecall;
procedure Set_linkColor(p: OleVariant); safecall;
function Get_linkColor: OleVariant; safecall;
procedure Set_vlinkColor(p: OleVariant); safecall;
function Get_vlinkColor: OleVariant; safecall;
function Get_referrer: WideString; safecall;
function Get_location: IHTMLLocation; safecall;
function Get_lastModified: WideString; safecall;
procedure Set_url(const p: WideString); safecall;
function Get_url: WideString; safecall;
procedure Set_domain(const p: WideString); safecall;
function Get_domain: WideString; safecall;
procedure Set_cookie(const p: WideString); safecall;
function Get_cookie: WideString; safecall;
procedure Set_expando(p: WordBool); safecall;
function Get_expando: WordBool; safecall;
procedure Set_charset(const p: WideString); safecall;
function Get_charset: WideString; safecall;
procedure Set_defaultCharset(const p: WideString); safecall;
function Get_defaultCharset: WideString; safecall;
function Get_mimeType: WideString; safecall;
function Get_fileSize: WideString; safecall;
function Get_fileCreatedDate: WideString; safecall;
function Get_fileModifiedDate: WideString; safecall;
function Get_fileUpdatedDate: WideString; safecall;
function Get_security: WideString; safecall;
function Get_protocol: WideString; safecall;
function Get_nameProp: WideString; safecall;
procedure write(psarray: PSafeArray); safecall;
procedure writeln(psarray: PSafeArray); safecall;
function open(const url: WideString; name: OleVariant; features: OleVariant;
replace: OleVariant): IDispatch; safecall;
procedure close; safecall;
procedure clear; safecall;
怎么看不到源吗?
没有:(
是用程序,要用源码
DongXF(孔雀东南飞)
怎么看不到源吗?
没有:(
WebBrowser1.Navagate('http://www.szonline.net');
Memo1.lines.add(IHtmlDocument2(WebBrowser1.Document).Body.OuterHtml);