VARIANT vt;
COleVariant vaUrl=_T("E:\\ie.html");
m_web.Navigate2(vaUrl,&vt,&vt,&vt,&vt);
IDispatch *pDisp=m_web.GetDocument();
IHTMLDocument2 *pDocument;
IHTMLElementCollection *pCollection;
pDisp->QueryInterface(IID_IHTMLDocument2,(void**)&pDocument);
HRESULT hr;
hr = pDocument->get_all(&pCollection);
if(hr==S_OK)
{
hr=pCollection->item(COleVariant("xianshi"),COleVariant((long)0),&pDisp);
}
if ( hr == S_OK )
{
IHTMLElement *pElement;
hr = pDisp->QueryInterface(IID_IHTMLElement,(void**)&pElement);
if ( hr == S_OK )
{
}
}
参考下这个http://blog.csdn.net/LightBoat09/article/details/5695505
这个具体要看你什么网页,html怎么写的,才好判断。如果你什么都不会,找一个别人的代码,我看你很难搞定。
这种情况,你不如用按键精灵等傻瓜化的工具软件来操作。