js遍历checkbox获取数据

function GetCurrenetPoint() {
            debugger
            var currentTypes = "";
            var display = $("#input_tbType").css("display");
            if (display == "none") {
                currentTypes = "bak";
            }
            else {
                $("input[name='type']").each(function () { if ($(this).attr('checked')) { currentTypes += $(this).val() + "@"; } });
                if (currentTypes != "") {
                    currentTypes = currentTypes.substring(0, currentTypes.length - 1);
                }
                else {
                    currentTypes = "bak";
                }
            }
            return currentTypes;
        }
原文地址:https://www.cnblogs.com/yisheng/p/3362907.html