2011-05-11 37 views

回答

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; 
+0

沒有在那裏... – XBasic3000

+0

在那裏什麼都沒有?不好意思,你是什麼意思?有源代碼,不在嗎?你不能在'main.pas'中看到'TMainForm.actDomExecute'方法嗎? –

+0

我不知道如何設置它的價值。看起來你只是在查看裏面的內容。 SetValue不起作用或分配值不會反映到當前頁面。任何想法如何? – XBasic3000