dimanche 5 août 2018

button working only for the first row

I've put button in my table EDIT column but the button is working only for the first row click event. I am trying to open pop up window on button click. The pop up is opened only for the first row button click only.

<tbody>
    @foreach($books as $data)
     <tr>
         <td>  </td>
         <td>  </td>
         <td>  </td>
         <td><button type="button" value="EDIT" style="height:20px;" id="myBtn"></button></td>
         <td>  </td>
     </tr>
    @endforeach
</tbody> 



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire