uses ........mshtml;
procedure TForm1.Button3Click(Sender: TObject);
var
doc:IHTMLDocument2;
begin
doc:=IHTMLDocument2(webbrowser1.document);
showmessage(doc.body.outerhtml);
end;
procedure TForm1.Button4Click(Sender: TObject);
var
doc:IHTMLDocument2;
begin
doc:=IHTMLDocument2(webbrowser1.document);
doc.location.replace('view-source:'+doc.location.href)
end;