Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Szerokość
kapral
post
Post #1





Grupa: Zarejestrowani
Postów: 208
Pomógł: 0
Dołączył: 5.03.2005

Ostrzeżenie: (20%)
X----


mam taki kod:
  1. <div style="height: 30px; width: 1px; backgroun-color: #000000"></div>

I czy istnieje możliwość zmiany w czsie szerokości tego div'a?
Chodzi mi oto aby co sekundę zmieniał swoją szerokość o 1 px, czyli wyszedł by taki pasek postępu
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 559
Pomógł: 6315
Dołączył: 27.12.2004




zjadles d (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

  1. <div id="prog" style="height: 30px; width: 1px; background-color: #000000"></div>
  2.  
  3. <script language="JavaScript">
  4. var width = 1;
  5. function show()
  6. {
  7. width++;
  8. obj=document.getElementById('prog');
  9. obj.style.width=width + "px";
  10. setTimeout('show()', 1000);
  11. }
  12. show();
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: 5.10.2025 - 16:55