Код - пример #1 | |
1 |
// ========= 1 вариант ========== Cтрана: <br /> <input type="radio" name="country" value="Russia" checked="checked">Россия <br /> <input type="radio" name="country" value="Other">Другая ... var the_value = $(":radio[name=country]").filter(":checked"); // ========= 2 вариант ========== <form id="radio_form"> <fieldset> <label><input type="radio" name="color" value="red" checked="checked" />Red</label><br /> <label><input type="radio" name="color" value="yellow" />Yellow</label><br /> <label><input type="radio" name="color" value="blue" />Blue</label><br /> <label><input type="radio" name="color" value="purple" />Purple</label><br /> </fieldset> </form> ... var the_value = $('#radio_form input:radio:checked').val(); |
четверг, 9 декабря 2010 г.
jQuery - как получить value radio элемента
Подписаться на:
Комментарии к сообщению (Atom)
Комментариев нет:
Отправить комментарий