JSFiddle - React, Tailwind, and code Playground
by BramVanroy
HTML
<form>
<p>
<input type="radio" name="scoreA" value="0"> 0
<input type="radio" name="scoreA" value="1"> 1<br/>
<input type="radio" name="scoreB" value="0"> 0
<input type="radio" name="scoreB" value="1"> 1
</p>
</form>
<div id="result">
</div>
JavaScript
$( document ).ready( function() {
$( "form" ).on( "click", "input[name^='score']", function () {
var a = $( "input[name='scoreA']:checked" ).val();
var b = $( "input[name='scoreB']:checked" ).val();
if( a && b ) {
$( "div#result" ).hide();
$( "div#result" ).html("<span>" + a + "</span> - <span>" + b + "</span>").show();
}
});
})