JSFiddle - React, Tailwind, and code Playground

HTML

<form>
<input type="radio" class="server" name="dimaz" value="1">раз
<input type="radio" class="server" name="dimaz" value="2">два
<input type="radio" class="server" name="dimaz" value="3">три
<input type="radio" class="server" name="dimaz2" value="1">четыре
<input type="radio" class="server" name="dimaz2" value="2">пять
<input type="radio" class="server" name="dimaz2" value="3">шесть
<input type="button" id='button' name="button" value="button">
</form>

JavaScript

var valRadio = [];
for(var i=0; i<document.forms[0].length; i++){
    if(document.forms[0].elements[i].type == 'radio'){
      valRadio.push(document.forms[0].elements[i].value);   
    }
}
alert(valRadio);