Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> onMouseOver oraz jedna definicja onmouseout dla wszystkiego?
kaszanka
post 19.01.2008, 21:29:58
Post #1





Grupa: Zarejestrowani
Postów: 138
Pomógł: 1
Dołączył: 17.02.2007

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


Hi,

Aktualnie doszedłem do czegoś takiego:

Dwa linki:
  1. <a href="pomoc1.html" onMouseOver="javascript:help('Pomoc nr 1')" onmouseout=clearText()>
  2. <a href="pomod2.html" onMouseOver="javascript:help('Pomoc nr 2')" onmouseout=clearText()>


tutaj pokaż podpowiedź po najechaniu odpowiednio na link pomoc1.html (Pomoc nr 1) oraz pomoc2.html (Pomoc nr 2)
  1. <div id="help"></div>

I ok pokazuje po najechaniu myszką.

kod js:
  1. function help(tresc)
  2. {
  3. document.getElementById('help').innerHTML = tresc;
  4. }
  5.  
  6. function clearText()
  7. {
  8. document.getElementById('clearText').innerHTML = 'Witaj...';
  9. }

I dlaczego po zdjęciu myszki z powyższych linków nie ukazuje się zawartość funkcji clearText czyli 'Witaj...' tylko pozostaje treść która ukazała się po najechaniu myszką na dany link?
Go to the top of the page
+Quote Post
grzesiek_g
post 19.01.2008, 21:37:19
Post #2





Grupa: Zarejestrowani
Postów: 249
Pomógł: 30
Dołączył: 18.07.2007

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


  1. function clearText()
  2. {
  3. document.getElementById('help').innerHTML = 'Witaj...';
  4. }


--------------------
Warsztat: Ubuntu 12.10, PHPStorm
http://vertoo.pl
Go to the top of the page
+Quote Post
kaszanka
post 19.01.2008, 21:46:49
Post #3





Grupa: Zarejestrowani
Postów: 138
Pomógł: 1
Dołączył: 17.02.2007

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


Dziękuje, za proste to było winksmiley.jpg
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 07:14