首页 > 代码库 > js checkbox多选值获取

js checkbox多选值获取

var objs = document.getElementsByTagName("input"); for (var i = 0; i < objs.length; i++) {    if (objs[i].type.toLowerCase() == "checkbox" && objs[i].checked)     alert(objs[i].value); }