/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Example. return radioValue(form['radioName']) */ function radioValue(radioNodeList) { for (var i = radioNodeList.length - 1; i > -1; i--) { if (radioNodeList[i].checked) { return radioNodeList[i].value; } } return false; }