zoukankan      html  css  js  c++  java
  • delphi webbrowser 获取iframe

    procedure TForm1.Button4Click(Sender: TObject);
    var
    Index: Integer;
    Document: IHTMLDocument2;
    FrameIdx: OleVariant;
    FrameDis: IDispatch;
    FrameWin: IHTMLWindow2;
    input:IHTMLElement;
    cardno,name,money,selbank,paypwd,strbank:string;
    P : TPoint;
    begin
    while Webbrowser1.ReadyState <> READYSTATE_COMPLETE do
    Application.ProcessMessages;

    if WebBrowser1.Document = nil then Exit;
    if WebBrowser1.Document.QueryInterface(IHTMLDocument2, Document) <> 0 then Exit;

    FrameIdx := 0;
    FrameDis := Document.frames.item(FrameIdx);
    if FrameDis.QueryInterface(IHTMLWindow2, FrameWin) <> 0 then Exit;
    framedis:=framewin.document.frames.item(FrameIdx);
    if FrameDis.QueryInterface(IHTMLWindow2, FrameWin) <> 0 then Exit;
    //memo1.Lines.Add( framewin.document.body.outerHTML);
    //FrameWin.document 就是你要的每个 Frame 的文档

    end;

  • 相关阅读:
    函数式编程
    高级特性
    ZooKeeper介绍
    perl 退出函数问题
    perl 处理 回车 换行符
    定义函数
    调用函数
    python 字典
    python 条件判断
    列表和数组
  • 原文地址:https://www.cnblogs.com/honeynm/p/3954136.html
Copyright © 2011-2022 走看看