Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 数字输入和jquery_Php_Jquery_Html Table_Rows - Fatal编程技术网

Php 数字输入和jquery

Php 数字输入和jquery,php,jquery,html-table,rows,Php,Jquery,Html Table,Rows,我有这张桌子: <table id="product" class="table table-bordered table-striped"> <thead> <tr> <th>Id</th> <th>Cantidad</th> <th>Producto</th> <th>Marca</th&

我有这张桌子:

<table id="product" class="table table-bordered table-striped">
   <thead>
     <tr>
        <th>Id</th>
        <th>Cantidad</th>
        <th>Producto</th>
        <th>Marca</th>
        <th>Precio</th>
        <th>Importe</th>
        <th>Serial</th>
     </tr>
   </thead>
   <tbody>
   </tbody>
</table>
我不知道为什么如果我更改数量输入,它在我用jquery添加的新行中被ubicated,它就不起作用,如果我做了更改,警报就不会出现,我做了什么坏事?谢谢

试试这个:

$(document).on("change", ".quantity", function () {
  alert(1);
});

使用
.on
功能<代码>$(“.quantity”).on('change',function(){})
$(".quantity").change(function () {
  alert(1);
});
$(document).on("change", ".quantity", function () {
  alert(1);
});