0
我正在使用SPRY分頁來分頁XML數據集。假設我在數據集中有成千上萬行,那麼SPRY分頁顯示100頁。這迫使我的頁面水平滾動,我不想要的效果。我怎麼能達到像下面顯示的東西或類似的東西:如何僅使用Spry分頁顯示幾頁
<< < 1 2 3 4 5 .. 100 > >>
我一直在嘗試這個天。
請幫我解決。
感謝
var myOspatches = new Spry.Data.XMLDataSet("include/myxml.xml", "system/ospatches/patch");
var myOspatchesPage = new Spry.Data.PagedView(myOspatches ,{ pageSize: pSize , forceFullPages:true, useZeroBasedIndexes:true});
var myOspatchesPageInfo = myOspatchesPage.getPagingInfo();
這是dispays的
<table id="osPatchesPagination" style="width:100%;display: none;">
<tr>
<td align="left">
<!--<pre> <input type="button" class="btn" value="First" onclick="myOspatchesPage.firstPage();" /> <input type="button" class="btn" value="Prev" onclick="myOspatchesPage.previousPage();"/></pre>-->
<pre> <a href="javascript:myOspatchesPage.firstPage();"><<</a> <a href="javascript:myOspatchesPage.previousPage();"><</a> </pre>
</td>
<td align="center">
<span spry:region="myOspatchesPageInfo" spry:repeatchildren="myOspatchesPageInfo">
<a spry:if="{ds_CurrentRowNumber} != {ds_RowNumber}" href="#" onclick="myOspatchesPage.goToPage('{ds_PageNumber}')">{ds_PageNumber}</a>
<span spry:if="{ds_CurrentRowNumber} == {ds_RowNumber}" class="currentPage">{ds_PageNumber}</span>
</span>
</td>
<td align="right">
<pre> <a href="javascript:myOspatchesPage.nextPage();">></a> <a href="javascript:myOspatchesPage.lastPage();">>></a> </pre>
<!--<pre> <input type="button" class="btn" value="Next" onclick="myOspatchesPage.nextPage();" /> <input type="button" class="btn" value="Last" onclick="myOspatchesPage.lastPage();" /></pre>-->
</td>
</tr>
</table>
我現在打字的答案,所以沒有必要重新發布你的問題 – 2011-05-31 22:52:43
很抱歉,我解決我的筆記本電腦(剛剛墜毀)作爲臨時調整(不是修復),如果該網站是活並保持特定寬度的頁碼,爲它們創建一個div容器,以便水平欄消失 – 2011-05-31 23:17:09