我想搜索表中的所有列。我尝试了很多,但没有工作。这里缺少什么?
<table id="table_id" class="display">
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Row 1 Data 1</td>
<td>asdf</td>
</tr>
<tr>
<td>tt</td>
<td>Row 2 Data 2</td>
</tr>
</tbody>
这是我的代码:
<script type="text/javascript" src="media/js/jquery.js"></script>
<script type="text/javascript" src="media/js/jquery.dataTables.js"> </script>
<link rel="stylesheet" href="media/css/demo_table.css" media="screen" />
<script language="javascript" type="text/javascript">
$(document).ready(function(){
$('#table_id').dataTable().columnFilter();
});
</script>