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);
});