CComPtr<IPersistFile> pFile = NULL;
if(SUCCEEDED(pDoc2->QueryInterface(IID_IPersistFile,(void**) &pFile)))
{ pFile->Save(filename.AllocSysString(),false);
}
向上面这样的编写的话,只能dump出网页的源代码,就类似在网页上用右键查看
源代码的结果一样。那么怎么能把Ajax动态插入的HTML源代码也写到文件中呢??
哪位大侠指教一下???谢谢
if(SUCCEEDED(pDoc2->QueryInterface(IID_IPersistFile,(void**) &pFile)))
{ pFile->Save(filename.AllocSysString(),false);
}
向上面这样的编写的话,只能dump出网页的源代码,就类似在网页上用右键查看
源代码的结果一样。那么怎么能把Ajax动态插入的HTML源代码也写到文件中呢??
哪位大侠指教一下???谢谢
但是通过IHMTLDocument2是可以遍历到Ajax插入的HTML代码,好郁闷。不知道为什么
能遍历到,却保持不了呢????
救命啊 各位大侠
BSTR bstrMode;
pDoc2->get_designMode(&bstrMode);
char* cMode = OLE2A(bstrMode);
if(strcmp(cMode,"On"))
{
pDoc2->put_designMode(OLESTR("On"));
}
Thank you for your tips. however,it still can't work.
BSTR bstrMode;
pDoc2->get_designMode(&bstrMode);
char* cMode = OLE2A(bstrMode);
if(strcmp(cMode,"On"))
{
pDoc2->put_designMode(OLESTR("On"));
}CComPtr<IPersistFile> pFile = NULL;
if(SUCCEEDED(pDoc2->QueryInterface(IID_IPersistFile,(void**) &pFile)))
{ pFile->Save(filename.AllocSysString(),false);
}
and write to the destination file. This way makes it.
http://www.codeproject.com/editctrl/HtmlEdit.asp