procedure TForm1.Button1Click(Sender: TObject); begin Webbrowser1.Navigate(www.baidu.com); //启动一个网站的网页 end;
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>大家好,我是老李,csdn Id Laoli</b>); //加入你要加的东西 end;