javascript - How to get all value that provide by checkbox -
how can value chekboxes provided ?
this code :
$(document).on('pjax:complete', function(data){ var checkbox = $("input[type='checkbox'][name='selection[]']"); (var = 0; < checkbox.length; i++) { console.log(checkbox[i]); // html string console.log(checkbox[i].val()); // checkbox[i].val not function } });
please advise.
you want chekbox values? try this:
$("input[type='checkbox']").serialize()
Comments
Post a Comment