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

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -