Get input text value in JS

Get input text value in JS

sawada91 sawada91 Posts: 1Questions: 0Answers: 0

I have a JS function and I want to get the text inside the search input tag of the DataTable. I have a normal DataTable with a filter textbox, and I only need to get the text whenever a JS function is called. I tried to search everywhere, but I didn't find what I was searching for. How can I do that? Thank you.

Replies

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    search() will give you the text that DataTables is currently using to filter the table (i.e. what is in the global input element).

    Allan

This discussion has been closed.