teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

2015/02/23 02:59

投稿

dboyaji
dboyaji

スコア62

answer CHANGED
@@ -1,24 +1,22 @@
1
- ```lang-<ここに言語を入力>
2
- <script type="text/javascript">
1
+ <script type="text/javascript">
3
- $(function(){
2
+ $(function(){
4
- $("#table_id").dataTable({
3
+ $("#table_id").dataTable({
5
- "aLengthMenu": [[25, 50, 100, 200, -1],[25, 50, 100, 200, "All"]],
4
+ "aLengthMenu": [[25, 50, 100, 200, -1],[25, 50, 100, 200, "All"]],
6
- "iDisplayLength" : -1
5
+ "iDisplayLength" : -1
7
- });
6
+ });
8
- });
7
+ });
9
- </script>
8
+ </script>
10
- </head>
9
+ </head>
11
- <body>
10
+ <body>
12
- <table id="table_id">
11
+ <table id="table_id">
13
- <thead>
12
+ <thead>
14
- <tr><th>Column 1</th><th>Column 2</th><th>etc</th></tr>
13
+ <tr><th>Column 1</th><th>Column 2</th><th>etc</th></tr>
15
- </thead>
14
+ </thead>
16
- <tbody>
15
+ <tbody>
17
- <?php for($i=1;$i<100;$i++){?>
16
+ <?php for($i=1;$i<100;$i++){?>
18
- <tr><td>Row <?php echo $i;?> Data 1</td><td>Row <?php echo $i;?> Data 2</td><td>etc</td></tr>
17
+ <tr><td>Row <?php echo $i;?> Data 1</td><td>Row <?php echo $i;?> Data 2</td><td>etc</td></tr>
19
- <?php } ?>
18
+ <?php } ?>
20
- </tbody>
19
+ </tbody>
21
- </table>
20
+ </table>
22
- ```
21
+
23
-
24
22
  上記のコードを使ってみてください。