foreach object/array in jQuery

后端 未结 5 2055
滥情空心
滥情空心 2021-02-08 15:02

I have a problem, i have X in my code, now I want to foreach this object/array its out put. - look my code.

$(\"#d         


        
5条回答
  •  遇见更好的自我
    2021-02-08 15:36

    How about

    $("#denied_seekrs").click(function() {
        var checkedInputs = $("input:checked");
        var test = "";
        $.each(checkedInputs, function(i, val) {
            test += val.value+",";
        });
        test = test.substring(0,(test.length-1));
        alert(test);
    });
    

提交回复
热议问题