get the Selected Objects in a TWebbrowser?

  • 主题发起人 主题发起人 import
  • 开始时间 开始时间
I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
get the Selected Objects in a TWebbrowser? procedure TForm1.Button1Click(Sender: TObject);
begin
if Webbrowser1.OleObject.Document.Selection.type = 'Control' then
begin
if Webbrowser1.OleObject.Document.Selection.CreateRange.CommonParentElement.tagName =
'IMAGE' then
ShowMessage('An Image is selected');
end
else
begin
if Webbrowser1.OleObject.Document.Selection.createRange.Text = '' then
ShowMessage('Nothing is selected - ');
end;
end;
 
后退
顶部