JSFiddle - React, Tailwind, and code Playground

by Michael Arndt

HTML

<form name="myForm">
 
 <label> 					<input type="radio" name="myRadio"  value="1">&nbsp;152-162 cm&nbsp;&nbsp; 
 &nbsp; 	&nbsp; 	&nbsp; 	<input type="radio" name="myRadio1" value="8">&nbsp;50&nbsp;&nbsp; &nbsp; &nbsp;  kg&nbsp;&nbsp; 
 							<input type="radio" name="myRadio2" value="15">&nbsp;&nbsp;Maennlich &nbsp;&nbsp; </label> <br />
 
 <label> 					<input type="radio" name="myRadio"  value="2">&nbsp;163-170 cm&nbsp;&nbsp; 
  &nbsp; 	&nbsp; 	&nbsp; 	<input type="radio" name="myRadio1" value="9">&nbsp;51-60 kg&nbsp;&nbsp;
  		 &nbsp;				<input type="radio" name="myRadio2" value="16">&nbsp;Weiblich &nbsp;&nbsp; </label> <br />
 
 <label> 					<input type="radio" name="myRadio"  value="3">&nbsp;171-175 cm&nbsp;&nbsp; 
 &nbsp; 	&nbsp; 	&nbsp; 	<input type="radio" name="myRadio1" value="10">&nbsp;61-69 kg&nbsp;&nbsp; </label> <br />
 			
 <label> 					<input type="radio" name="myRadio"  value="4">&nbsp;176-180 cm&nbsp;&nbsp; 
 &nbsp; 	&nbsp; 	&nbsp; 	<input type="radio" name="myRadio1" value="11">&nbsp;70-79 kg&nbsp;&nbsp; </label> <br />
 
 <label> 					<input type="radio" name="myRadio"  value="5">&nbsp;181-185 cm cm&nbsp;&nbsp; 
 							<input type="radio" name="myRadio1" value="12">&nbsp;80-89 kg&nbsp;&nbsp; </label> <br />
 			
 <label> 					<input type="radio" name="myRadio"  value="6">&nbsp;186-193 cm cm&nbsp;&nbsp; 
 							<input type="radio" name="myRadio1" value="13">&nbsp;90-99 kg&nbsp;&nbsp; </label> <br />
 			
 <label> 					<input type="radio" name="myRadio"  value="7">&nbsp;184-200 cm cm&nbsp;&nbsp; 
 							<input type="radio" name="myRadio1" value="14">&nbsp;100-110 kg&nbsp;&nbsp; </label> <br />
  
  <input type="button" value="Your Size"
         onClick="alert(radioWert(document.myForm.myRadio));">
</form>

JavaScript

function radioWert(rObj) {
    for (var i=0; i<rObj.length; i++) if (rObj[i].checked) return rObj[i].value;
    return false;
  }