Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript]Zatrzymanie setInterval
arzach
post
Post #1





Grupa: Zarejestrowani
Postów: 332
Pomógł: 6
Dołączył: 27.11.2008

Ostrzeżenie: (0%)
-----


Zrobiłem taki kod

Kod
var intervalHandler=setInterval(stoper,1000);

<span
style="cursor: pointer; text-decoration: underline"
onmouseover="clearInterval(intervalHandler)">
Stop
</span>


i po najechaniu zatrzymuje mi się odliczanie i chciał bym dodać do tego że jak zjadę z linka to wznowi mi się odliczanie i zrobiłem tak
Kod
<span
style="cursor: pointer; text-decoration: underline"
onmouseover="clearInterval(intervalHandler)" onmouseout="clearInterval(intervalHandler)">
Stop
</span>

i nie działa.
Wie ktoś czemu ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
arzach
post
Post #2





Grupa: Zarejestrowani
Postów: 332
Pomógł: 6
Dołączył: 27.11.2008

Ostrzeżenie: (0%)
-----


Ok dziala
Kod
<a href="stop.php" onmouseover="clearInterval(intervalHandler)" onmouseout="intervalHandler=setInterval('stoper()', 1000)">opis</a>


Ten post edytował arzach 30.11.2008, 09:32:18
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 9.10.2025 - 00:06