My JS goes here <input type='radio'id="Hero"/>
the bunch of functions below get the radio button get unchecked whenever it gets clicked even time
var hero=document.getElementById('Hero');
hero.addEventListener('onclick',"bye(this)");
function bye(this){
var check=this.id; /////Here I am getting the id of the element
hoya();
if(c%2==0){
check.checked=false;
}
}
function hoya(){
++c;
return c;
}
When you select a new car, a function is triggered which outputs the value of the selected car.
– Suyash Srivastava Feb 28 '17 at 19:30