Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [jquery] Jak pobrać nazwy wszystkich radio z danego formularza?
yasiek
post
Post #1





Grupa: Zarejestrowani
Postów: 59
Pomógł: 0
Dołączył: 4.06.2006
Skąd: Strzeszyce/Kraków

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


No i mam taki mały problem. Mój kod wygląda mniej więcej tak:

  1. <form id="form1">
  2. <input type="radio" name="1" value="1" /><input type="radio" name="1" value="2" /><input type="radio" name="1" value="3" />
  3. <input type="radio" name="2" value="1" /><input type="radio" name="2" value="2" /><input type="radio" name="2" value="3" />
  4. <input type="radio" name="3" value="1" /><input type="radio" name="3" value="2" /><input type="radio" name="3" value="3" />
  5. </form>
  6.  
  7. <form id="form2">
  8. <input type="radio" name="4" value="1" /><input type="radio" name="4" value="2" /><input type="radio" name="4" value="3" />
  9. <input type="radio" name="5" value="1" /><input type="radio" name="5" value="2" /><input type="radio" name="5" value="3" />
  10. <input type="radio" name="6" value="1" /><input type="radio" name="6" value="2" /><input type="radio" name="6" value="3" />
  11. </form>


Chcę w jquery pobrać nazwy radio, jakie są w form1. Jak to ugryźć? Chcę później sprawdzać, czy każda z grup radio jest zaznaczona ($("input[@name='1']:checked").val() != 'undefined' - ta funkcją będzie chyba najlepsza). Jeżeli jest - będzie pojawiał się button do wysłania formularza.
Dzięki za wszelkie sugestie smile.gif
Go to the top of the page
+Quote Post

Posty w temacie


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 Aktualny czas: 19.08.2025 - 10:29