[]在网上找到了一个类似的问题, 可惜也没有答案
(http://textcontrol.com/tx/newsgroups/comp_lang_pascal_delphi_components_writing/2002/04/05/0003.htm)
Hi, I have used IHTMLDocument::get_Script() which returns a IDispatch for
the scripting engine. How can I get access the names of the functions
and global variables of scripts withing a HTML page? If I know the
name prehand, I can use IDispatch->GetIDsOfName() to get the DISPID of
particular variable or function. However, if I don't know the name, I
can't find way to retrieve the names.