Foro de elhacker.net

Programación => Desarrollo Web => Mensaje iniciado por: kakashi20 en 13 Junio 2013, 17:30 pm



Título: no muestra valor input
Publicado por: kakashi20 en 13 Junio 2013, 17:30 pm
hola tengo esta tabla

Código
  1. <table id="TableFactura" border='1' align="center" width='90%'>
  2.  
  3.                        <tr>
  4.                            <td width='12%'>Item:</td>
  5.                            <td width='12%'>Referencia:</td>
  6.                            <td width='12%'>Precio:</td>
  7.                            <td width='12%'>Impuesto:</td>
  8.                            <td width='12%'>Descripci&oacute;n:</td>
  9.                            <td width='12%'>Cantidad:</td>
  10.                            <td width='12%'>Total:</td>
  11.                            <td width="12%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
  12.  
  13.                        </tr>
  14.                        <tr class="item">
  15.                            <td><input type='text' name='item[]' id='item' size='20' /></td>
  16.                            <td><input type='text' name='ref[]' id='ref' size='20' /></td>
  17.                            <td><input type='text' name='precio[]' onkeydown="calcular()" id='precio' size='10' /></td>
  18.                            <td><input type='text' name='impuesto[]' id='impuesto' size='20' /></td>
  19.                            <td><textarea name='desc[]' id='desc'></textarea></td>
  20.                            <td><input type='text' name='cant[]' id='cant' size='10' /></td>
  21.                            <td align="center"><div id="total"></div></td>
  22.                            <td></td>
  23.                        </tr>
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.                    </table>
  31.  


y tengo este script en jquery

Código
  1.  
  2. function calcular(){
  3.  
  4. $('#TableFactura tr.item').each(function() {
  5.    //var customerId = $(this).find("td:eq(3) > input").val() * $(this).find("td:eq(6) > input").val();
  6. alert($(this).find("td:eq(3) > input").val());  
  7. });
  8.  
  9.  
  10. }
  11.  
  12.  


el problema es que no me esta monstrando el valor que le paso al input precio...

si alguien me pudiese ayudar se lo agradeceria


Título: Re: no muestra valor input
Publicado por: kakashi20 en 13 Junio 2013, 18:21 pm
resuelto...!!!