I need to make when the user clicks the radio button, it saves that value of the id and when clicking on another button "confirm" it shows the id of the first button clicked.
I tried to do with localstorage, but it ends up showing all the id's of all the buttons.
<div class="row">
<div class="col-sm">
<button type="button" class="btn btn-primary" id="1">EXCEDEU O HORARIO</button>
</div>
<div class="col-sm">
<button type="button" class="btn btn-primary" id="2">CLIENTE REALIZOU</button>
</div>
<div class="col-sm">
<button type="button" class="btn btn-primary" id="3">ERRO DE ENTREGA</button>
</div>
</div>
<button type="button" class="btn btn-success but_pag_nao" id="confirm_ob" onClick="ok();">CONFIRMAR</button>