//执行javascript脚本
IHTMLDocument2* pDocument2 = NULL;
m_Web.get_Document()->QueryInterface(IID_IHTMLDocument2, void(**)&pDocument2);
if (pDocument2)
{
IHTMLWindow2* pWindow2 = NULL;
pDocument2->get_parentWindow(&pWindow2);
if (pWindow2)
{
CComVariant retValue;
pWindow2->execScript(L"alert('Hello');", L"javascript", &retValue);
}
}