?? page.tag
字號:
?<%@ tag import="com.parddu.crm.util.Page" pageEncoding="utf-8" %>
<%@ attribute name="name" description="分頁對象名稱" required="true" %>
<%@ attribute name="scope" description="分頁對象存儲范圍" required="true" %>
<%@ attribute name="formName" description="表單名" required="true" %>
<%
Page pag = null; //分頁對象
if(scope.toLowerCase().equals("request")){
pag = (Page)request.getAttribute(name);
}
else if(scope.toLowerCase().equals("session")){
pag = (Page)session.getAttribute(name);
}
else{
pag = (Page)application.getAttribute(name);
}
%>
<style type="text/css" >
.txt{
border-top:0px;
border-left:0px;
border-right:0px;
border-bottom:solid 1px;
border-bottom-color:blue;
text-align: center;
}
.but{
border:solid 1px;
border-color:blue;
}
</style>
<script type="text/javascript">
function mouseover(input){
input.style.backgroundColor="#c2cfe5";
}
function mouseout(input){
input.style.backgroundColor="#ffffff";
}
</script>
<font style="font-size:12px;color=#006699;">
共 <%=pag.getRecoredCount() %> 條記錄
每頁<input type="text" class="txt" style="width:24px;" onmouseover="mouseover(this)" onmouseout="mouseout(this)" name="pageNumber" size="3" value="<%=pag.getPageNumber() %>" />條
當前<input type="text" class="txt" style="width:24px;" onmouseover="mouseover(this)" onmouseout="mouseout(this)" name="pageIndex" size="3" value="<%=pag.getPageIndex() %>" />頁/共<%=pag.getPageCount() %>頁
<a href="javascript:first()" style="text-decoration:none;">『第一頁』</a>
<a href="javascript:before()" style="text-decoration:none;">『上一頁』</a>
<a href="javascript:next()" style="text-decoration:none;">『下一頁』</a>
<a href="javascript:last()" style="text-decoration:none;">『最后頁』</a>
<input type="button" value="跳轉" onmouseover="mouseover(this)" onmouseout="mouseout(this)" class="but" onclick="send()" />
</font>
<script type="text/javascript">
function send(){
this.document.<%=formName %>.submit();
}
function first(){
this.document.<%=formName %>.pageIndex.value = 1;
send();
}
function before(){
this.document.<%=formName %>.pageIndex.value = <%=pag.getPageIndex()-1 %>;
send();
}
function next(){
this.document.<%=formName %>.pageIndex.value = <%=pag.getPageIndex()+1 %>;
send();
}
function last(){
this.document.<%=formName %>.pageIndex.value = <%=pag.getPageCount() %>;
send();
}
</script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -