/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var bFlag = $('#test2').is(':checked'); // To get the currently selected radio button's id var id = $("input[@name=testGroup]:checked").attr('id'); // Input has a unique 'value' attribute: var value = $("input[@name=testGroup]:checked").val(); // Check the checkbox $("input").attr("checked", "checked"); // Radiobutton value $('.columns input:radio:checked').val()