1, $("input[name=‘pitch‘]").get(0).checked = true;
//这里的name=‘pitch‘则是name的value,get(0)是获取第一个索引的单选框,checked=true则是选中操作,不选中则为false
2, $("input[name=‘pitch‘]").attr(‘checked‘,‘true‘);
//这个跟1意思差不多
3, $($(‘#pitch‘)).prop(‘checked‘,true);
//这里是对id为pitch的单选或者多选进行全部选中
原文:https://www.cnblogs.com/joeyJss/p/14741483.html