var radio_groups = {}
$(":radio").each(function(){
radio_groups[this.name] = true;
})
找到哪个广播组已经检查了无线电框,哪个没有:
for(group in radio_groups){
if_checked = !!$(":radio[name='"+group+"']:checked").length
alert(group+(if_checked?' has checked radios':' does not have checked radios'))
}