How to get value entered in search box In Datatables

前端 未结 5 1838
[愿得一人]
[愿得一人] 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:54

    Try this function to detect the key press and then draw the DataTablee.

    $('#search').on('keyup change', function () {
        var table = $('#example').DataTable();
        table.api().search($(this).val()).draw();
    });

提交回复
热议问题