lundi 6 juillet 2015

How to get the value of checkbox which has been checked

I have a list of checkbox in my html page. Now when a user clicks on the checkbox and when he presses Donwload button i should be able to know what all checkbox has been clicked with checked state.

 <tr st-select-mode="multiple" st-select-row="row"
            ng-repeat="row in orders">
 <td>{{ row.orderid }}<td>
 <td><input type="checkbox" name="{{ row.orderid }}"></td>
 </tr>
 <button type="button" class = "btn btn-default" ng-click="download()">Download Order</button>

hence when i click on the Download order button i need to pass the values of orderid against which checkbox state is checked.

So how this can be done. I am not getting the idea how to proceed.




Aucun commentaire:

Enregistrer un commentaire