Home > front end >  Turn the DataTables after filtered data how to obtain?
Turn the DataTables after filtered data how to obtain?

Time:09-21

Var example1=$(' # example1). The DataTable ();
The console. The log (example1. Rows (). The data ());//get all the data

Below the table there are 13 original records, I search in jiangsu province shows four records, how the four record out? Thank you very much!!

CodePudding user response:

How to display the original article 13 record? Change of the original article 13 to search the article 4 no

CodePudding user response:

1/f, reference code for the family's reply:
how to display the original article 13 record? Change of the original article 13 to search the article 4 no

May I say not clear,
Example1. Rows (). The data ()//this code is to obtain all form data.
I want to use the JQUERY search the filtered data, such as the above form I typed in jiangsu, how to get the four data?

CodePudding user response:

refer to the second floor fangsky response:
Quote: 1/f, reference code for the family's reply:

How to display the original article 13 record? Change of the original article 13 to search the article 4 no

May I say not clear,
Example1. Rows (). The data ()//this code is to obtain all form data.
I want to use the JQUERY search the filtered data, such as the above form I typed in jiangsu, how to get the four data?


Get values into the search box, and then you can use js to filter out the filter function in line with the data,
A little bit more simple can declare an array, and then to the for loop of the data, which is to judge the value of the search box is added to the array
  • Related