Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <tr data-code="TEST1" data-description="Test Product (EACH)" data-whqc="" >
- <td>
- TEST1
- </td>
- <td>
- Test Product (EACH)
- </td>
- <td>
- 4
- </td>
- <td style="text-align: center">
- <input name="qty" type="text" class="qty" maxlength="5">
- </td>
- </tr>
- var array = [];
- $("#tbl").find("tr[data-code]").each(function () {
- var qty = parseFloat($(this).find(".qty").val()) || 0;
- if (qty > 0) {
- array[array.length] = {
- Code: $(this).attr("data-code"),
- Description: $(this).attr("data-description"),
- Whqc: $(this).attr("data-whqc"),
- Qty: qty
- };
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement