vendredi 13 mai 2016

Get multiple checkbox value with Ajax

I have trouble cant get multiple value from check box with Ajax. I can get one checkbox value but multiple value not work. Here is my HTML code

  <input name="p_flatform" class="p_flatform" type="checkbox" value="1">Iphone
 <input name="p_flatform" class="p_flatform" type="checkbox" value="2">Ipad
<input name="p_flatform" class="p_flatform" type="checkbox" value="3">Android

And this is my Ajax

$.ajax({
        url: 'quotation_validation',
       type: 'post',
       data: { p_flatform:$('input[name="p_flatform"]:checked').val()},

It didnt work. Please help.




Aucun commentaire:

Enregistrer un commentaire