1. HTML code:
The code is as follows:
var opinionCategory = document.getElementsByName('opinionCategory');
var opinionCategoryValue = 1;
var form = document.getElementById('userOpinionForm');
var num = 0; for(var i=0;i
if(form.opinionCategory[i].checked){
num ;