🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.lang.javascript
1 messages
1 total messages Started by Jakub Sun, 24 Aug 2014 16:22
Sprawdzenie kóry link jest aktualny
#51447
Author: Jakub
Date: Sun, 24 Aug 2014 16:22
41 lines
1934 bytes
Witam
mam w html taką listę:

<ul id="abc">
<li>Komputery</li>
<li>Elektronika i Foto</li>
<li>Strefa Gracza</li>
<li>AGD</li>
<li>Dom i ogród</li>
</ul>


i po najechaniu myszą chcę sprawdzić który z nich jest aktualnie poświetlony
/ aktywny.

Na raze wymysliłem taki kod:

 function display(){
  me = document.getElementById("abc");

  me.onmouseover = function(){
   lista = me.getElementsByTagName('li');
   ile = lista.length;
   for (i=0; i<ile; i++){
     el = lista[i];
    //    ??? nie wiem ja odczytaj który z elemtów li jest aktywny
   }
  }
  me.onmouseout = function(){
  };
 }

 nIntervId = setInterval(display, 300);
}


jak sprawdzić który z elementów LI jest aktywny po najechaniu myszą?

Pozdrawiam

Jakub
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads