Javascript Jquery数据表插件不工作
我有一个tabe,想在代码中使用jquerydatable插件,但它不起作用。我尝试下载javascript和css文件并使用它们。他帮助我找到解决办法。这是我的密码Javascript Jquery数据表插件不工作,javascript,jquery,plugins,datatable,html-table,Javascript,Jquery,Plugins,Datatable,Html Table,我有一个tabe,想在代码中使用jquerydatable插件,但它不起作用。我尝试下载javascript和css文件并使用它们。他帮助我找到解决办法。这是我的密码 <script src="required/jquery-3.2.1.js" type="text/javascript"></script> <link href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css" r
<script src="required/jquery-3.2.1.js" type="text/javascript"></script>
<link href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
<table class="display" cellspacing="0" width="100%" id="example">
<tr>
<th>Question:</th>
<th>option1</th>
<th>option2</th>
<th>option3</th>
<th>option4</th>
<th>Right option</th>
<th>Action</th>
</tr>
<tr><td>Who is the father of science?</td>
<td>Sir Issac Newton</td>
<td>Albert Einstein</td>
<td>Michel Farady</td>
<td>Robert Hook</td>
<td>2</td>
<td>Edit Delete</td>
</tr>
<tr>
<td>Who is father of computer?</td>
<td>Charles Babbage</td>
<td>Lady Ada </td>
<td>Blaise Pascal</td>
<td>Bill Gates</td>
<td>1</td>
<td>Edit Delete</td>
</tr>
<tr>
<td>rame</td>
<td>a</td>
<td>s</td>
<td>a</td>
<td>a</td>
<td>1</td>
<td>Edit Delete</td>
</tr>
<tr>
<td>q</td>
<td>a</td>
<td>e</td>
<td>e</td>
<td>e</td>
<td>1</td>
<td>Edit Delete</td>
</tr>
</table>
<script type="text/javascript">
$(document).ready(function () {
$('#example').DataTable();
});
</script>
问题:
选择1
选择2
选择3
选择4
正确的选择
行动
谁是科学之父?
牛顿爵士
爱因斯坦
米歇尔·法拉第
罗伯特·胡克
2.
编辑删除
谁是计算机之父?
查尔斯·巴贝奇
艾达夫人
布莱斯·巴斯卡
比尔盖茨
1.
编辑删除
框架
A.
s
A.
A.
1.
编辑删除
Q
A.
E
E
E
1.
编辑删除
$(文档).ready(函数(){
$(“#示例”).DataTable();
});
在您的表中不可用。只需在thead
中添加标题,然后重试
<thead>
<th>Question:</th>
<th>option1</th>
<th>option2</th>
<th>option3</th>
<th>option4</th>
<th>Right option</th>
<th>Action</th>
</thead>
问题:
选择1
选择2
选择3
选择4
正确的选择
行动
导航器控制台中是否有错误?是的,它说jquery.dataTables.min.js:90:237中未定义“c”,我如何解决这个问题???@prashantkandel您应该编辑您的帖子,以包含您收到的错误信息,以及预期的行为。