开发者

pass value as array/collection

I have this code:

var addNew = $('#divListBox').find(':checked')
                     .map(function() {
                         return $(this).val();
                     }).get();

I want to know if there's a way to get all the value that's checked and put t开发者_高级运维hem in a collection so I can send it to my controller?


you can do this...

var v_coll=[];
$('#divListBox').find(':checked').each(function(){
   v_coll.push($(this).val);
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜