窗体中放了个WebBrowser控件,用于载入指定网页,怎样在网页中通过JS调用delphi中的方法?急求!

解决方案 »

  1.   

    这个我知道,我在.net中已经实现了,delphi怎么实现,请高手指教。。希望给出代码跪谢!
      

  2.   

    一直是用URL传特殊参数。
    <a href="index.html#mydelphifunction,param1,param2">执行delphi</a>BeforeNavigate2事件中处理
    if pos('#mydelphifunction', URL) > 0 then begin
    Cancel := true;
    //delphi 执行函数
    end;
      

  3.   

    How to call Delphi code from scripts running in a TWebBrowserhttp://www.delphidabbler.com/articles?article=22&part=1