Pobieranie typu elementu strony z Webbrowsera + myszka

0

Witam, mam wczytana stronkę w WebBrowserze, moje pytanie brzmi czy się da i jak ewentualnie zrobić, aby kursor myszki po najechaniu na jakiś element strony wskazywal mi jego typ np. najeżdzam na pole tekstowe kursorem to zwraca mi że kursor dotyka INPUTBOXa (ten element to np.

<input id="login" name="login" value="" type="text">

)

dodanie znacznika <code class="html"> - furious programming

0

Coś w ten deseń:

procedure TForm1.Timer1Timer(Sender: TObject);
var
  Doc: IHTMLDocument2;
  Elem: IHTMLElement;
  p: TPoint;
begin
  Doc:= WebBrowser1.Document as IHtmlDocument2;
  if Assigned(Doc) then
  begin
    GetCursorPos(p);
    p:= WebBrowser1.ScreenToClient(p);
    Elem:= Doc.elementFromPoint(p.X, p.y);
    if Assigned(Elem) then
      Label1.Caption:= Elem.tagName;
  end;
end;

1 użytkowników online, w tym zalogowanych: 0, gości: 1