是否有使用delphi嵌入式chrome的经验? delphichromiumembedded。 如何访问其HTML文档?比如为Editbox指定一个值
答案 0 :(得分:9)
有关示例,请参阅demos\guiclient目录。
更新:在iGoogle页面上设置输入字段文本的示例:
procedure TMainForm.actDomExecute(Sender: TObject);
var
q: ICefDomNode;
begin
crm.Browser.MainFrame.VisitDomProc(
procedure (const doc: ICefDomDocument)
var
q: ICefDomNode;
begin
// "q" is the ID of the text input element
q := doc.GetElementById('q');
if Assigned(q) then
q.SetElementAttribute('value', 'Hello, world');
end
);
end;