如何在cppwebbrowser里面修改网页内容
procedure TForm1.Button2Click(Sender: TObject); var Range:IHTMLTxtRange; begin Range := ((WebBrowser1.Document as IHTMLDocument2).body as IHTMLBodyElement).createTextRange; Range.collapse(False); Range.pasteHTML(' <br> <b>插入的内容</b>'); end; void __fastcall TForm1::Button2Click(TObject *Sender){ IHTMLTxtRange* Range =0; IHTMLDocument2* HTMLDoc =0; IHTMLBodyElement* HTMLBodyElem=0; HTMLDoc = dynamic_cast<IHTMLDocument2*>(WebBrowser1.Document); if(HTMLDoc){ HTMLBodyElem =dynamic_cast<IHTMLBodyElement*>(HTMLDoc); if(HTMLBodyElem) { HTMLBodyElem->createTextRange(&Range); if(Range) { Range->collapse(false); Range.pasteHTML(" <br> <b>插入的内容</b>"); // 加入你要的东东 } } }}