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

📄 page.tag

📁 企业人力资源管理
💻 TAG
字号:
<%@ tag pageEncoding="gbk"%>
<%@ attribute name="url" description="url"%>
<%@ attribute name="count" description="count"%>
<%@ attribute name="curPage" description="curtPage"%>
<style>
<!--
div table td 			{vertical-align:middle;}
div table td span		{color:red;}
.page_bgcolor			{color:#AAAAAA;background-color:#F2F2F2;border:1px solid #AAAAAA;padding-top:2;}
-->
</style>
<script type="text/javascript">
<!--
//获取总页数
var maxPage=Math.ceil(${count}/10);
//获取当前页
var curPage = ${curPage};
//分页导航操作
function navigate_page(index){
	var obj = event.srcElement;//获取对象
	obj.onfocus = function(){//防止其产生编辑文本框事件
		this.blur();
	};	
	if(1 <=index && index <= maxPage && index!= curPage){//进行判断页面跳转判断
		var bg_color = obj.style.backgroundColor;
		var color = obj.style.color;
		obj.style.backgroundColor = "#B0C9F2";
		obj.style.color = "#586AE9";
		obj.style.cursor = "hand";
		obj.onmouseout = function(){
			this.style.backgroundColor = bg_color;
			this.style.color = color;
			obj.style.cursor = null;
		};
		obj.onclick = function(){	
			window.location.href="${url}"+"&curPage="+index+"&count="+${count};
		}
	}
}
//文本框内输入回车
function press_enter(e){
	if(13 == event.keyCode){
		go_page(e.value);
	}
}
//指定前往的页面
function go_page(index){
	index=index.replace(/ */,"");
	if(1 == curPage){
		alert("没有分页数据显示!");
	}else if(!index){
		alert("请输入即将前往的页面!");
	}else if(isNaN(index)){
		alert("请您务必输入数字!");
	}else if(1 > index || index > maxPage){
		alert("请输入有效的数字!");
	}else if(curPage == index){
		alert("您的期望页面已是当前页。");
	}else{
		window.location.href="${url}"+"&curPage="+index+"&count="+${count};
	}
	document.getElementsByName("selectPage")[0].focus();
}
//-->
</script>
<div id='page' style='font-size:10px'>
	<br />
	<table width='500px' border='0' cellpadding='0' cellspacing='0'
		style='font-size:12px'>
		<tr>
			<td colspan="12" height="5px"></td>
			<td rowspan="2">跳转到<input type="text" id="selectPage" onkeyup="press_enter(this);" size="3"/>&nbsp;<img src="/hr/images/main/go.bmp" onclick="go_page(selectPage.value)" /></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>共<span>${count}</span>条记录</td>
			<td>&nbsp;</td>
			<td>共<span id='pageCount'><script>pageCount.innerText=Math.ceil(${count}/10);</script></span>页</td>
			<td>&nbsp;</td>
			<td>当前第<span>${curPage }</span>页</td>
			<td>&nbsp;</td>
			<td><input class="page_bgcolor" size="5" value=" 首页" onmouseover="navigate_page(1);"/></span></td>
			<td><input class="page_bgcolor" size="5" value="上一页" onmouseover="navigate_page(${curPage-1 });"/></td>
			<td><input class="page_bgcolor" size="5" value="下一页" onmouseover="navigate_page(${curPage+1 });"/></td>
			<td><input class="page_bgcolor" size="5" value=" 尾页" onmouseover="navigate_page(Math.ceil(${count}/10));"/></td>
			<td>&nbsp;</td>
		</tr>
	</table>
</div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -