は、ここに私のスクリーンショットです: Jqueryのデータ型ボタンが機能しません。
この私の次のコードです:私はhttps://datatables.net/extensions/buttons/customから、このコードを使用しようとしている
<link href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css" rel="stylesheet">
<link href="https://cdn.datatables.net/buttons/1.2.4/css/buttons.dataTables.min.css" rel="stylesheet">
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
</tr>
<tr>
<td>Garrett Winters</td>
<td>Accountant</td>
<td>Tokyo</td>
</tr>
</tbody>
</table>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script
<Script src="https://cdn.datatables.net/buttons/1.2.4/js/dataTables.buttons.min.js"></script>
<script>
$(document).ready(function() {
$('#example').DataTable({
dom: 'Bfrtip',
buttons: [
{
text: 'My button',
action: function (e, dt, node, config) {
alert('Button activated');
}
}
]
});
});
</script>
。なぜmy button
ボタンが表示されなかったのですか?私はなぜこのコードが動作していないのだろうと思っていた。誰も "jQuery DataTables Button"の使い方を教えてください。