table to datatable(sortable table) library - sorttable.js

북마크 추가

1. http://www.kryogenix.org/code/browser/sorttable/sorttable.js      js파일 다운 

 

2. <script src="sorttable.js"></script>​ 스크립트 불러옴

 

3. table 클래스 명에 sortable 추가 <table class="sortable">

 

4. ajax를 사용하는 경우 

 

호출 후

var newTableObject = document.getElementById(테이블ID);

sorttable.makeSortable(newTableObject); 

 

 

헤더의 컬럼을 클릭하면 오름차순, 내림차순으로 정렬되는 결과를 볼 수 있다.

 


 

 

AD
관리자
2014-09-15 10:58
SHARE