⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 page.tag

📁 权限组件的java代码写法例子下载
💻 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 + -