3,245
社区成员
发帖
与我相关
我的任务
分享
CComQIPtr<IHTMLDocument3> spDoc = GetHtmlDocument();
CComPtr<IHTMLElement> spElem;
CComQIPtr<IHTMLIFrameElement3> spIfeameElem;
CComQIPtr<IHTMLInputElement> spInputElem;
CComDispatchDriver spDispatch;
CComBSTR bstrValue;
spDoc->getElementById(CComBSTR(L"mainframe"), &spElem);
spDoc.Release();
spIfeameElem = spElem;
spElem.Release();
spIfeameElem->get_contentDocument(&spDispatch);
spDoc = spDispatch;
spDoc->getElementById(CComBSTR(L"mobileNo"), &spElem);
spInputElem = spElem;
spInputElem->get_value(&bstrValue);
MessageBox(bstrValue);