달력

02

« 2012/02 »

  •  
  •  
  •  
  • 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
  •  
  •  
  •  

이전 블로그(http://blog.naver.com/nashira7)에서 옮겨왔습니다.
작성일 : 2005년 7월 18일
옮긴일 : 2008년 12월 22일

페이징 사용하기

 

1. 바인딩된 TABLE 엘리먼트의 DATAPAGESIZE 속성을 한번에 출력하기 원하는 레코드의 최대 개수로 설정한다.

 

 <table datasrc="#dsoXMLFile1" DATAPAGESIZE="5" border="1" cellpadding="5">

 

2. TABLE 엘리먼트 메소드를 호출한다.

TABLE 엘리먼트 메소드 효과 예제호출
firstPage 레코드의 첫 페이지를 보여준다. InventoryTable.firstPage()
previousPage 레코드의 이전 페이지를 보여준다. InventoryTable.previousPage()
nextPage 레코드의 다음 페이지를 보여준다. InventoryTable.nextPage()
lastPage 레코드의 마지막 페이지를 보여준다. InventoryTable.lastPage()

 

 

3. BUTTON HTML 엘리먼트의 ONCLICK 속성을 메소드로 지정한다.

<body>
   <xml id="dsoXMLFile1" src="XMLFile1.xml"></xml>
   <h2>Book Inverntory</h2>
   <button onclick="dsoXMLFile1.firstPage()">|&lt; 첫 페이지</button>
   <button onclick="dsoXMLFile1.previousPage()" ID="Button1">&lt; 이전 페이지</button>
   <button onclick="dsoXMLFile1.nextPage()" ID="Button2">다음 페이지&gt;</button>
   <button onclick="dsoXMLFile1.lastPage()" ID="Button3">마지막 페이지 &gt;|</button>

   <table datasrc="#dsoXMLFile1" datapagesize="5" border="1" cellpadding="5">
      <thead>
         <th>Title</th>
         <th>Author</th>
         <th>Binding</th>
         <th>Pages</th>
         <th>Price</th>
      </thead>
      <tr align="center">
         <td><span datafld="TITLE" style="font-style:italic"></span></td>
         <td><span datafld="AUTHOR"></span></td>
         <td><span datafld="BINDING"></span></td>
         <td><span datafld="PAGES"></span></td>
         <td><span datafld="PRICE"></span></td>
      </tr>
   </table>
</body>

 

 

4. 결과화면.


 

저작자 표시 비영리 변경 금지
TAG
Posted by -세티-