JSFiddle - React, Tailwind, and code Playground

by Alexis LĂłpez Espinoza

HTML

<input type = "radio" name = "MedioPago" value = "100" /> 100
<input type = "radio" name = "MedioPago" value = "200" checked /> 200
<input type = "radio" name = "MedioPago" value = "300" /> 300

JavaScript

var varFormaPago = document.querySelector("[name=MedioPago]:checked").value;
alert(varFormaPago);