Jquery 数组与字符串之间的转换

 var auth_list = [];
        $("input[name='auth_list']:checkbox").each(function () {
            if ($(this).attr("checked")) {
                auth_list.push($(this).attr('value') );
            }
        });
        var str = auth_list.join(',');

console.log(str);

//4,3,2,1
原文地址:https://www.cnblogs.com/wt645631686/p/9881146.html