Node.js examples for HTML:Checkbox
Is checkbox single checked
function isSingleChecked(field){ var sel = false; var objs = document.getElementsByName(field); if(null == objs || typeof(objs)=='undefined'){ return;//from ww w .j a va 2 s . c om } for(var i=0;i<objs.length;i++){ if(objs[i].checked){ sel = true; break; } } return sel; }