Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- MySQL
- 개발자와 비즈니스 관계
- 개발자에세이
- add colume
- public.pem
- django slack bot
- #알고리즘
- 숲을 바라보는 개발자
- innodb_buffer_pool_size 오류
- #데이터베이스 #트랜잭션 #ACID #격리수준
- 비즈니스적 관점에서 생각하는 개발자
- AWS Aurora
- 개발자의 마인드
- 비즈니스적 관점에서 생각하는 개발자 #개발자 마인드
- 슬랙봇
- sed명령어
- django #django 5.0 #django 5.0 요약
- slack bot
- 웹소켓 api
- 알고리즘
- 데이터베이스 오류
- private.pem
- 비즈니스
- 개발자와 비즈니스
- #백준 #드래곤커브 #알고리즘
- 정렬
- django slack
- django 슬랙봇
- ssl.key
- 업비트 웹소켓
Archives
- Today
- Total
Info-Tech
부트스트랩 Datatable 사용법 본문
부트스트랩은 다양한 css와 UI를 좋게 꾸며주는 여러가지 기능들을 제공한다.
그중에서 Datatable은 우리가 만든 테이블을 좀 더 직관적이고 보기 편한 UI로 만들 수 있게 한다.
대표적으로 100개 넘는 테이블 data에 대해서 pagenation을 해준다거나 한다.
사용방법은 간단하다.
head에 아래와 같은 cdn을 삽입해준다.
<head>
</head>
다음과 같이 table을 만들어 준다. 이때 정해진 class를 사용해주도록 한다.
<table id="table_id" class="table table-striped table-bordered" style="width:100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>61</td>
<td>2011/04/25</td>
<td>$320,800</td>
</tr>
<tr>
<td>Garrett Winters</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>63</td>
<td>2011/07/25</td>
<td>$170,750</td>
</tr>
<tr>
<td>Ashton Cox</td>
<td>Junior Technical Author</td>
<td>San Francisco</td>
<td>66</td>
<td>2009/01/12</td>
<td>$86,000</td>
</tr>
</tbody>
</table>
다음은 스크립트에 들어 갈 내용이다.
<script>
$(document).ready(function() {
$(‘#table_id').DataTable();
} );
</script>
Comments