Directly modify TWEBBROWSER display content

xiaoxiao2021-03-06  71

Procedure TFORM1.BUTTON1CLICK (Sender: TOBJECT);

Begin WebBrowser1.naviGate ('About: blank'); End; Procedure TFORM1.BUTTON2CLICK (Sender: TOBJECT);

Var v: olevariant;

Begin v: = WebBrowser1.document; s: = ' ' 'body {font-family: "Song", "Times New Roman"; Font-size: 12px; Margin-Left: 0px; Margin-Top: 0px; Margin- Right: 0px; margin-bottom: 0px;} ' ' Welcome! '; v.script.document.body.innerhtml: = S;

END;

转载请注明原文地址:https://www.9cbs.com/read-109447.html

New Post(0)