如何获取Webbrowser控件中所浏览的HTML页面的长和宽?谢谢!!

解决方案 »

  1.   

    var Doc : IHTMLDocument2;
        maxheight: integer;
    begin
      Doc:=Webbrowser1.document as IHTMLDocument2;
      maxheight:=Doc.body.getAttribute('availHeight',0);
      {...}
    end;具体的属性、你自己到MSDN↓查查看
    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/dhtml_node_entry.asp依次点击:
    Web Development -> HTML and Dynamic HTML -> SDK Documentation -> Reference -> Properties
      

  2.   

    HTML页面的长和宽,分析Html源码的<body > 中的Width 和 height可以吗?