0
我想改變我的表的一些設置與數據表功能,不過參數jQuery的數據表功能選項不工作
paging: false,
scrollY: 400
都沒有任何上表的任何影響。
<html>
<head>
<meta charset=utf-8 />
<link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css">
</head>
<body>
<table id='example'>
<thead>
<tr><th class='site_name'>Name</th><th>Url </th><th>Type</th><th>Last modified</th></tr>
</thead>
<tbody>
</tbody>
</table>
<script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js"></script>
<script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script>
<script>
$("#example").DataTable({
"aaData":[
["Sitepoint","http://sitepoint.com","Blog","2013-10-15 10:30:00"],
["Flippa","http://flippa.com","Marketplace","null"],
["99designs","http://99designs.com","Marketplace","null"],
["Learnable","http://learnable.com","Online courses","null"],
["Rubysource","http://rubysource.com","Blog","2013-01-10 12:00:00"]
],
paging: false,
scrollY: 400
}
);
</script>
</body>
</html>
我從https://www.sitepoint.com/working-jquery-datatables/代碼,並從https://datatables.net/manual/options選項的說明。