🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #51447

Sprawdzenie kóry link jest aktualny

#51447
From: 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
Technical Details
Message-ID: <53fa022b$0$2227$65785112@news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!feeder.erje.net!eu.feeder.erje.net!enother.net!enother.net!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!feeder.erje.net!eu.feeder.erje.net!enother.net!enother.net!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
From: "Jakub" <jak74@interia.pl>
Newsgroups: pl.comp.lang.javascript
Subject: Sprawdzenie kóry link jest aktualny
Date: Sun, 24 Aug 2014 17:22:33 +0100
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
Lines: 46
Message-ID: <53fa022b$0$2227$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 31.61.129.100
X-Trace: 1408893484 unt-rea-b-01.news.neostrada.pl 2227 31.61.129.100:5040
X-Complaints-To: abuse@news.neostrada.pl
X-Received-Bytes: 1558
X-Received-Body-CRC: 1032529309
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit