【发布时间】:2020-09-02 13:52:44
【问题描述】:
我正在为我的课程制作一个表格,但无法加载来自数据表的精美表格,我只是得到一个无聊的旧 html 表格。
我在我的书中查看了代码,它似乎是相同的。我仍然收到错误
Failed to load resource: net::ERR_FILE_NOT_FOUND
我不知道出了什么问题。 这是代码
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="C:\Users\bas_t\OneDrive\Code Educom\JQuery\JQuery\style.css"/>
<link rel="stylesheet" href="//cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css"/>
<script src="js/jquery.js" />
<script src="//cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"/>
<script>
$(document).ready( function() {
$('#theBeatles').DataTable();
})
</script>
</head>
<body>
<table id="theBeatles"
class="display nowrap dataTable dtr-inline collapsed">
<thead>
<th>Name</th>
<th>Email</th>
<th>Instrument</th>
</thead>
<tbody>
<tr>
<td>John Lennon</td>
<td>john@thebeatles.co.uk</td>
<td>Guitar</td>
</tr>
<!-- and so on with the other members -->
</tbody>
</table>
</body>
</html>
【问题讨论】:
标签: javascript jquery datatables