<input type="radio" name="myRadios" onclick="handleClick(this);" value="1" />
<input type="radio" name="myRadios" onclick="handleClick(this);" value="2" />
<script>
var currentValue = 0;
function handleClick(myRadio) {
currentValue = myRadio.value;
}
</script>