前端頁面開發知識點(巢狀和分頁)
1.src裡面的內容是請求路徑,對應controller中的路徑,返回的是要巢狀的頁面路徑
<iframe src="iframe" style="width: 1145px; height: 685px;" name="contentIframe" id="contentIframe"></iframe>
<iframe src="iframe2" style="width: 1145px; height: 766px; display:none" name="contentIframe2" id="contentIframe2"></iframe>
2.分頁的兩種方法
(1)使用juery.page.js自帶的分頁
<script type="text/javascript" src="${base}/statics/js/jquery.page.js"></script>
<div class="container common_page_wrap">
</div>
<script type="text/javascript">
$(function() {
$(".container .common_page_wrap").createPage(
{
"pageCount" : "${reportList.reportInfoDTOs.pager.totalPage}",
"current" : "${reportList.reportInfoDTOs.pager.curPage}",
"total" : "${reportList.reportInfoDTOs.pager.totalRow}",
"backFn" : function(p) {
location.href = "${base}/report/index?pageNum="
+ p+"&id="+${reportList.reportId};
}
});
});
</script>
(2)自己寫的分頁
<div class="container common_page_wrap">
<a href="${base}/news/getCopoVideoList.do?pageNum=1" class="btn begin">首頁</a>
<#if info.data.pager.curPage==1>
<a href="javascript:volid(0);" class="btn pre"><</a>
<#else>
<a href="${base}/news/getCopoVideoList.do?pageNum=${info.data.pager.curPage-1}" class="btn pre"><</a>
</#if>
<a href="" class="btn page">${info.data.pager.curPage }</a>
<#if info.data.pager.curPage==info.data.pager.totalPage>
<a href="javascript:volid(0);" class="btn next">></a>
<#else>
<a href="${base}/news/getCopoVideoList.do?pageNum=${info.data.pager.curPage+1}" class="btn next">></a>
</#if>
<a href="${base}/news/getCopoVideoList.do?pageNum=${info.data.pager.totalPage}" class="btn end disable">尾頁</a>
</div>