Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Przyciski w java
-Gość_!speed!_*-
post
Post #1





Goście







a wiec ... chcialem zrobic cos takiego zeby moje przyciski... po wcisnieciu zostaly.... a jak przelacze na inny to zeby sie odcisnelo... a przeszlo na tamto... (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) i nie wiem jak to zrobic ...

chcialbym zeby ktos mi edytowal... skrypt ...

w HEAD umiescilem :
  1. <script TYPE="text/javascript" LANGUAGE="JavaScript">
  2. <!--
  3.  
  4. function przycisk(podstawowy, wskazany, klikniety, tekst)
  5. {
  6. if (document.images)
  7. {
  8. this.name = "img" + przyciski.length;
  9. if (podstawowy) { this.normal = new Image(); this.normal.src = podstawowy }
  10. if (wskazany) { this.over = new Image(); this.over.src = wskazany }
  11. if (klikniety) { this.down = new Image(); this.down.src = klikniety }
  12. }
  13. if (tekst) this.opis = tekst;
  14.  
  15. this.normalizuj = normalizuj;
  16. this.podswietl = podswietl;
  17. this.kliknij = kliknij;
  18.  
  19. return this;
  20.  
  21. function normalizuj() { if (document.images) document.images[this.name].src = this.normal.src; window.status = "" }
  22. function podswietl() { if (document.images && this.over) document.images[this.name].src = this.over.src; if (this.opis) window.status = this.opis }
  23. function kliknij() { if (document.images) document.images[this.name].src = this.down.src }
  24. }
  25. //-->
  26. <script TYPE="text/javascript" LANGUAGE="JavaScript">
  27. <!--
  28. przyciski = new Array("");
  29. if (document.images)
  30. {
  31. // Dodawanie kolejnych przycisków:
  32. przyciski[1] = new przycisk("home1a.jpg", "home1b.jpg", "home1c.jpg");
  33. przyciski[2] = new przycisk("ubrania1a.jpg", "ubrania1b.jpg", "ubrania1c.jpg");
  34. przyciski[3] = new przycisk("akcesoria1a.jpg", "akcesoria1b.jpg", "akcesoria1c.jpg");
  35. przyciski[4] = new przycisk("podroz1a.jpg", "podroz1b.jpg", "podroz1c.jpg");
  36. przyciski[5] = new przycisk("biuro1a.jpg", "biuro1b.jpg", "biuro1c.jpg");
  37. przyciski[6] = new przycisk("eventy1a.jpg", "eventy1b.jpg", "eventy1c.jpg");
  38. przyciski[7] = new przycisk("kontakt1a.jpg", "kontakt1b.jpg", "kontakt1c.jpg");
  39. }
  40. //-->


a pozniej w BODY :
  1. <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber4" height="35" bgcolor="#000000">
  2. <tr>
  3. <td width="12%" height="35" align="center" valign="middle">
  4. <p align="center">
  5. <a onfocus="blur()" target="_top" onMouseOver="przyciski[1].podswietl(); return true" onMouseDown="przyciski[1].kliknij()" onMouseUp="przyciski[1].podswietl(); return true" onMouseOut="przyciski[1].normalizuj(); return true" href="index.html">
  6. <IMG SRC="home1a.jpg" NAME="img1" BORDER="0" width="91" height="30" align="right"></a></td>
  7. </td>
  8. <td width="12%" height="35" align="center" nowrap>
  9. <p align="center">
  10. <A HREF="ubrania.html" onfocus="blur()" target="bok" onMouseOver="przyciski[2].podswietl(); return true" onMouseDown="przyciski[2].kliknij()" onMouseUp="przyciski[2].podswietl(); return true" onMouseOut="przyciski[2].normalizuj(); return true">
  11. <IMG SRC="ubrania1a.jpg" NAME="img2" BORDER="0" width="88" height="30"></A></td>
  12. </td>
  13. <td width="12%" height="35" align="center" nowrap valign="middle">
  14. <p align="center">
  15. <a onfocus="blur()" target="bok" onMouseOver="przyciski[3].podswietl(); return true" onMouseDown="przyciski[3].kliknij()" onMouseUp="przyciski[3].podswietl(); return true" onMouseOut="przyciski[3].normalizuj(); return true" href="akcesoria.html">
  16. <IMG SRC="akcesoria1a.jpg" NAME="img3" BORDER="0" width="87" height="30"></a></td>
  17. </td>
  18. <td width="12%" height="35" align="center" nowrap valign="middle">
  19. <p align="center">
  20. <A HREF="podroz.html" onfocus="blur()" target="ramka" onMouseOver="przyciski[4].podswietl(); return true" onMouseDown="przyciski[4].kliknij()" onMouseUp="przyciski[4].podswietl(); return true" onMouseOut="przyciski[4].normalizuj(); return true">
  21. <IMG SRC="podroz1a.jpg" NAME="img4" BORDER="0" width="87" height="30"></A></td>
  22. </td>
  23. <td width="12%" height="35" align="center" nowrap valign="middle">
  24. <p align="center">
  25. <A HREF="biuro.html" onfocus="blur()" target="ramka" onMouseOver="przyciski[5].podswietl(); return true" onMouseDown="przyciski[5].kliknij()" onMouseUp="przyciski[5].podswietl(); return true" onMouseOut="przyciski[5].normalizuj(); return true">
  26. <IMG SRC="biuro1a.jpg" NAME="img5" BORDER="0" width="87" height="30"></A></td>
  27. </td>
  28. <td width="12%" height="35" align="center" nowrap valign="middle">
  29. <p align="center">
  30. <A HREF="eventy.html" onfocus="blur()" target="ramka" onMouseOver="przyciski[6].podswietl(); return true" onMouseDown="przyciski[6].kliknij()" onMouseUp="przyciski[6].podswietl(); return true" onMouseOut="przyciski[6].normalizuj(); return true">
  31. <IMG SRC="eventy1a.jpg" NAME="img6" BORDER="0" width="87" height="30"></A></td>
  32. </td>
  33. <td width="13%" height="35" align="center" nowrap valign="middle">
  34. <p align="center">
  35. <A HREF="kontakt.html" onfocus="blur()" target="ramka" onMouseOver="przyciski[7].podswietl(); return true" onMouseDown="przyciski[7].kliknij()" onMouseUp="przyciski[7].podswietl(); return true" onMouseOut="przyciski[7].normalizuj(); return true">
  36. <IMG SRC="kontakt1a.jpg" NAME="img7" BORDER="0" width="93" height="30"></A></td>
  37. </td>
  38. <td width="13%" height="35" align="center" nowrap valign="middle">
  39. <p align="center"> </td>
  40. </tr>
  41. </table>
Go to the top of the page
+Quote Post

Posty w temacie
- Gość_!speed!_*   Przyciski w java   13.07.2006, 09:31:00
- - siemakuba   Cytatchcialem zrobic cos takiego zeby moje przycis...   13.07.2006, 10:01:07
- - nasty_psycho   w css zrob klase w ktorej bedzie bedzie styl borde...   13.07.2006, 10:08:49
- - Gość_!speed!_*   a wiec .. macie stronke.... www.media-plus.yoyo.pl...   13.07.2006, 10:59:42
- - Gość_!speed!_*   sorrki zle wpisalem stronke Media-Plus.   13.07.2006, 11:01:57
- - Cysiaczek   Słuchaj. Jak nie umiesz wytłumaczyć, to jak mozesz...   13.07.2006, 11:10:35
- - nasty_psycho   ~Cysiu: @Gość_!speed!_* jest u nas gosciem...   13.07.2006, 11:14:55
- - Gość_!speed!_*   sorry panie Cysiaczek.... ale nie umiem tego i sie...   13.07.2006, 11:34:29
- - nasty_psycho   to nie sa przyciski, tylko obrazki ktore sie zmien...   13.07.2006, 11:41:19
- - Gość_!speed!_*   no dobrze... ale o takie cos mi chodzi ... moze mi...   13.07.2006, 12:51:09
- - Gość_!speed!_*   pomoze mi ktos ?   13.07.2006, 16:29:15
- - Gość_!speed!_*   hallo ?   13.07.2006, 21:34:56
- - slash12345   Przejdź iteracyjnie przez wszystkie przyciski, zmi...   13.07.2006, 21:40:18
- - Gość_!speed!_*   duzo to z tego nie rozumiem... mozesz mi powiedzie...   14.07.2006, 14:55:10


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: 23.08.2025 - 08:21