Inserted input type = "radio" tags with your data-group attribute:
<input type="radio" id="id1" data-group="group1"> <input type="radio" id="id2" data-group="group1"><br> <input type="radio" id="id3" data-group="group2"> <input type="radio" id="id4" data-group="group2"><br> As for all elements of input type = "radio", in which the data-group is equal to "group1", set checked = false?
JS - программистinterface, but, as you know, interfaces should not replace native code. In the depths of the nucleus, manipulations take place, which, on the one hand, implicitly carry out cross-browser compatibility, on the other hand, deprive the freedom of action of IMHO. - user31688