Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][JavaScript]Przycisk nie chce się pokolorować.
Maniek1313
post
Post #1





Grupa: Zarejestrowani
Postów: 148
Pomógł: 2
Dołączył: 8.07.2011

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


Witam mam problem a mianowicie zrobiłem kod dzięki , któremu mogę pokolorować przyciski. Gdy otwieram stronę w przeglądarce przyciski nie są pokolorowane.


Oto kod :

Plik index.html

  1. <script type="text/javascript" src="funkcje.js">
  2. pomaluj("przycisk");
  3. pomaluj("pole");
  4. </head>
  5. <input type="button" value="Wyślij" id="przycisk" name="przycisk">
  6. <br>
  7. <hr>
  8. <br>
  9. <input type="text" name="pole" id="pole">
  10. </body>
  11. </html>



A tu kod pliku funkcje.js

  1. function pomaluj(id){
  2. var er;
  3. er = document.getElementById(id);
  4. er.style.background = 'orange';
  5. }
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: 24.08.2025 - 01:32