Question: how to get selected value of html radio button in javascript?
Answer: Get Value of Selected Radio Button Onsubmit document. getElementById('demoForm'). onsubmit = function() { // this (keyword) refers to form to which onsubmit attached // 'ship' is name of radio button group var val = getRadioVal(this, 'ship'); // display value obtained alert(val); // more code here ... }