取值: $("input[name='XX'][checked]").val(); 赋值: $("input[name='XX']").eq(index).attr('checked', 'true');