Answers for "radio button getelementsbyname"

0

radio button getelementsbyname

var radioButtons = document.getElementsByName("Vehicle");for (var i = 0; i < radioButtons.length; i++) {    if (radioButtons[i].checked) {        console.log("radioButton " + i + ": " + radioButtons[i].value);    }}
Posted by: Guest on February-06-2020
0

document get element by id radio button

var selectedOption = $("input:radio[name=option]:checked").val()
Posted by: Guest on February-26-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language