Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

datatables search not working

<!DOCTYPE html>
<html>
  
<head>
    <!-- jQuery -->
    <script type="text/javascript" 
        src="https://code.jquery.com/jquery-3.5.1.js">
    </script>
  
    <!-- DataTables CSS -->
    <link rel="stylesheet" href=
"https://cdn.datatables.net/1.10.23/css/jquery.dataTables.min.css">
  
    <!-- DataTables JS -->
    <script src=
"https://cdn.datatables.net/1.10.23/js/jquery.dataTables.min.js">
    </script>
</head>
  
<body>
    <h1 style="color: green;">
        GeeksForGeeks
    </h1>
    <h3>DataTables Searching Option</h3>
  
    <!--HTML table with student data-->
    <table id="tableID" class="display">
        <thead>
            <tr>
                <th>ID</th>
                <th>Name</th>
                <th>Age</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>1</td>
                <td>Sam</td>
                <td>35</td>
            </tr>
            <tr>
                <td>2</td>
                <td>Sam</td>
                <td>30</td>
            </tr>
            <tr>
                <td>3</td>
                <td>Sameer</td>
                <td>45</td>
            </tr>
            <tr>
                <td>4</td>
                <td>Rob</td>
                <td>4</td>
            </tr>
            <tr>
                <td>5</td>
                <td>Robber</td>
                <td>68</td>
            </tr>
            <tr>
                <td>6</td>
                <td>Mikasa</td>
                <td>25</td>
            </tr>
            <tr>
                <td>7</td>
                <td>Eren</td>
                <td>23</td>
            </tr>
            <tr>
                <td>8</td>
                <td>Jean</td>
                <td>35</td>
            </tr>
            <tr>
                <td>9</td>
                <td>Walter</td>
                <td>65</td>
            </tr>
            <tr>
                <td>10</td>
                <td>Jessie</td>
                <td>28</td>
            </tr>
            <tr>
                <td>11</td>
                <td>Gabi</td>
                <td>20</td>
            </tr>
        </tbody>
    </table>
      
    <script>
  
        // Initialize the DataTable
        $(document).ready(function () {
            $('#tableID').DataTable({
  
                // Disable the searching 
                // of the DataTable
                searching: false
            });
        });
    </script>
</body>
  
</html>
Comment

PREVIOUS NEXT
Code Example
Javascript :: foreach db mongodb 
Javascript :: convert to 24 hours format javasript 
Javascript :: mongoose reset database 
Javascript :: vs code shows bodyparser deprecated 
Javascript :: send serialized form data jquery 
Javascript :: sequelize init connection set up nodejs node 
Javascript :: http to https redirect express js 
Javascript :: javascript change color of text input 
Javascript :: angular 2 reactive forms radio button by default checked 
Javascript :: react router dom v6 active link 
Javascript :: array without duplicates js 
Javascript :: react form submit values with name 
Javascript :: download file from api vue 
Javascript :: js password generator 
Javascript :: express receive post 
Javascript :: how to limit characters in number input js 
Javascript :: urlencoded limit nodejs express 
Javascript :: prisma seed 
Javascript :: react native paper text input 
Javascript :: join a list of strings into one string javascript 
Javascript :: javascript reset span html 
Javascript :: Page Height Bottom 
Javascript :: xmlhttprequest 
Javascript :: react native npm run start port 
Javascript :: default selected radio button angular material 
Javascript :: google auth.onstatechange 
Javascript :: how to pass the data from one page to another in javascript 
Javascript :: findbyid mongoose 
Javascript :: forming an object with reduce 
Javascript :: js substring first 4 numbwe 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =