¿como haria para obtener el valor de cantidad?, en el alert no me muestra,eh intentando cambiandolo a input, pero no me funciona.
<head>
<script src="https://code.jquery.com/jquery-3.3.1.js" type="text/javascript"></script>
</head>
<body>
<div >
<table id="mitabla" border="1" class=" display table display table-striped">
<thead>
<tr>
<th>Check</th>
<th>Codigo</th>
<th>Articulo</th>
<th>Precio</th>
<th>Cantidad</th>
<th>Presentacion</th>
</tr>
</thead>
<tbody>
<tr>
<td class="check"><input name="" type="checkbox"></td>
<td>PRO001</td>
<td>Mantequilla</td>
<td>12.5</td>
<td><input type="number" value="1" /></td>
<td>En paquete</td>
</tr>
<tr>
<td class="check"><input name="" type="checkbox"></td>
<td>PRO002</td>
<td>Yogurt</td>
<td>5.60</td>
<td><input type="number" value="1" /></td>
<td>En botella</td>
</tr>
<tr>
<td class="check"><input name="" type="checkbox"></td>
<td>PRO003</td>
<td>Gaseosa</td>
<td>3.50</td>
<td><input type="number" value="1" /></td>
<td>En botella</td>
</tr>
<tr>
<td class="check"><input name="" type="checkbox"></td>
<td>PRO004</td>
<td>Pul</td>
<td>3.50</td>
<td><input type="number" value="1" /></td>
<td>En botella</td>
</tr>
<tr>
<td class="check"><input name="" type="checkbox"></td>
<td>PRO005</td>
<td>Jamonada</td>
<td>2.10</td>
<td><input type="number" value="1" /></td>
<td>En paquete</td>
</tr>
<tr>
<td class="check"><input name="" type="checkbox"></td>
<td>PRO003</td>
<td>Gaseosa</td>
<td>3.50</td>
<td><input type="number" value="1" /></td>
<td>En botella</td>
</tr>
<tr>
<td class="check"><input name="" type="checkbox"></td>
<td>PRO004</td>
<td>Pul</td>
<td>3.50</td>
<td><input type="number" value="1" /></td>
<td>En botella</td>
</tr>
<tr>
</tbody>
</table>
</div>
<button id="enviar">Enviar</button>
</body>
<script>
jQuery(document).ready(function() {
jQuery('#enviar').on('click', function() {
var filas = [];
var tot=0;
$('#mitabla tbody tr').each(function() {
var codigo = $(this).find('td').eq(1).text();
var articulo = $(this).find('td').eq(2).text();
var precio = $(this).find('td').eq(3).text();
var cantidad = $(this).find('input').eq(4).text();
var presentacion = $(this).find('td').eq(5).text();
var val = precio * cantidad;
tot+=val;
var fila = {
codigo,
articulo,
precio,
cantidad,
presentacion
};
filas.push(fila);
// var des = JSON.stringify(fila);
//alert(des);
});
var desa =JSON.stringify(filas);
alert(desa);
alert(tot);
});
});
</script>