Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript][HTML]Jednorazowy button
andych1
post
Post #1





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 12.06.2010

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


Witam,
Mam taki problem, że chcę, aby po kliknięciu w button stawał się on "disabled"
Kod buttona:
  1. <input type="text" name="text2">
  2. <button onclick="document.getElementById('Imie2').value=document.getElementById('text2').value; ">Potwierdź</button>
  3. <P>
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
smietek
post
Post #2





Grupa: Zarejestrowani
Postów: 306
Pomógł: 32
Dołączył: 20.01.2008

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


  1. <button onclick="this.disabled = true;">Text</button>


Czyli w twoim wypadku będzie to:
  1. <button onclick="document.getElementById('Imie2').value=document.getElementById('text2').value; this.disabled = true;">Potwierdź</button>


Ten post edytował smietek 13.06.2010, 19:53:34
Go to the top of the page
+Quote Post

Posty w temacie
- andych1   [JavaScript][HTML]Jednorazowy button   13.06.2010, 19:37:44
- - erix   Pokaż, jak próbowałeś.   13.06.2010, 19:47:38
- - smietek   [HTML] pobierz, plaintext <button onclick=...   13.06.2010, 19:52:47


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: 6.10.2025 - 02:57