如何快速地将文本插入到TWebbrowser,并使TWebbrowser有往下滚的效果
这期间插入的一行行文本会很多
同聊天室的的快速刷屏差不多,如何实现,或者提供其他思路先给出100分,如果解决另有高分相赠!

解决方案 »

  1.   


    var
    o : Olevariant;
          htmldoc:   IHTMLDocument2;  begin
    o := WebBrowser1.OleObject.document.all.item('User_Id',0);   //找到录入信息的输入框
    o.value :='~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~';  //写入你的信息
    o.Click;      htmldoc   :=   o.Document   as   IHTMLDocument2;   
          htmldoc.Get_parentWindow.scrollby(0,1);     
      end;   
    inttostr(htmldoc.body.getAttribute('offsetHeight',0))--瀏覽器大小   
      inttostr(htmldoc.body.getAttribute('scrollTop',0))     ---當前頂點的位置   
      inttostr(htmldoc.body.getAttribute('scrollHeight',0))   --總的頁面高度   
    滚多少自已去判断
      

  2.   

    有这样个方法可以试试
    IHTMLElement.scrollIntoView(0);