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