编写一个Dll,
使IE下JavaScript中
可用window.external.myFunction(*, ... ,*)
就像MyIE2中可以用window.external.m2_readIni(...);来读取某ini文件。

解决方案 »

  1.   

    这是msdn中的:
    Extending the Dynamic HTML Object Model
    It is possible for the hosting application to extend the Dynamic HTML Object Model so that scripts can refer to functionality implemented by the host. Such scripts refer to the host by specifying the external object that is available from the window object. For example, a reference to "window.external.speech" will call the host to resolve the name "speech." All standard script within the document will be executed normally.This extension mechanism is implemented in the host by providing an IDispatch interface for the object model extension that will have IDispatch::GetIDsOfNames and IDispatch::Invoke called on it to resolve any references to the external object. The IDispatch that the host provides is obtained by the WebBrowser Control or MSHTML component by calling the host's IDocHostUIHandler::GetExternal method.For an example of how to extend the Dynamic HTML Object Model, see the Driller Sample Source Page .这是微软网站上的例子
    http://msdn.microsoft.com/downloads/samples/internet/default.asp?url=/downloads/samples/internet/browser/driller/default.asp
      

  2.   

    你看vc或vb的例子不一样吗?看懂大意就行。
    程序员不能只懂一种语言的呀。