jeudi 12 décembre 2019

How to get all values from tag which checkbox is checked with jquery?

I have created a table and I create rows dynamically with while loop. There is also checkbox in table. I want to pass in php page values which are checked with jquery.

<table border="1px" bordercolor="#666666">
    <tr>
      <td style="color:#F63">#</td>
      <td style="color:#F63">Size</td>
      <td style="color:#F63">Price</td>
      <td style="color:#F63">Quantity</td>
    </tr>
    <?php
       $i=1;
          while($rec1=mysqli_fetch_array($data1))
          {?>                            
          <tr>
              <td style="color:#006"><label class="checkbox"><input name="check<?php echo $i?>" type="checkbox"><i> </i></label></td>
              <td id="size<?php echo $i?>" style="color:#006"><?php echo $rec1[2];?></td>
              <td id="price<?php echo $i?>" style="color:#006"><?php echo $rec1[3];?></td>
              <td style="color:#006">
                  <div class="number">
                      <span class="minus">-</span>
                      <input class="mp" id="mp<?php echo $i?>" type="number" value="1"/>
                      <span class="plus">+</span>
                  </div>
              </td>
          </tr>
          <?php
              $i++;
           }        
          ?>



Aucun commentaire:

Enregistrer un commentaire