How to get value entered in search box In Datatables

前端 未结 5 1852
[愿得一人]
[愿得一人] 2020-12-30 23:14

How to get value entered in search box In Datatables. Is there a way to get value entered in search box in Data Tables?

5条回答
  •  臣服心动
    2020-12-30 23:31

    you can do something like this works for all datatable version what we are doing here is tracking the search input field and then getting its value only no need to use datatable api using this method

    $('input[type="search"]').on( 'keyup', function () {
                console.log($(this).val());
    } );
    

提交回复
热议问题