0

我有以下代码:

var analogSearch = $('#dataTableAnalog_filter :input').val();
var digitalSearch = $('#dataTableDigital_filter :input').val();

为了从输入中获取值

之后,我使用:

    var analogSearchInput = $('#dataTableAnalog_filter :input');
    var digitalSearchInput = $('#dataTableDigital_filter :input');
    analogSearchInput.val(analogSearch);
    digitalSearchInput.val(digitalSearch);

将数据重新输入到输入端。我想在每个输入中单击 Enter 以过滤 DataTable。那可能吗?

4

1 回答 1

0
$('#inputId').on('keydown', function(event) {

    if ( event.which == 13 ) {
     //Do Something Here...Submit Maybe?
    }   

});
于 2012-11-03T19:42:36.663 回答