Jquery 动态添加行时检测对窗体的更改

Jquery 动态添加行时检测对窗体的更改,jquery,forms,Jquery,Forms,在jQuery中使用clone()函数动态添加行时,如何检测对表单的更改 这就是我所尝试的: $('table input').change(function() { // Execute the function }); 当行从一开始就在这里,但克隆行时,此函数不起作用 非常感谢。只需使用以下功能: $(document).on('change', 'table input', function() { // Execute the function }); 只要用这个:

在jQuery中使用clone()函数动态添加行时,如何检测对表单的更改

这就是我所尝试的:

$('table input').change(function() {
    // Execute the function
});
当行从一开始就在这里,但克隆行时,此函数不起作用

非常感谢。

只需使用以下功能:

$(document).on('change', 'table input', function() {
    // Execute the function
});
只要用这个:

$(document).on('change', 'table input', function() {
    // Execute the function
});