change_page.js
上传用户:huijianzhu
上传日期:2009-11-25
资源大小:9825k
文件大小:3k
- /**
- * author : zww
- * date : 2004-8-11
- */
- /**
- * form 表单
- * pageNo 翻页页码
- */
- function goPage(form, pageNo) {
- // alert(pageNo) ;
- // if(!isInteger(pageNo)) {
- // alert("请输入一个有效的数字作为页数!");
- // return false;
- // }
- if(pageNo < 1) {
- alert("最小页码为1");
- form.PAGE_gopage.focus();
- return;
- }
- //判断form是否有此属性
- if(form.pageCurrent) {
- form.pageCurrent.value = pageNo;
- }
- form.submit();
- }
- //向页面打印出分页的操作显示部分
- function drawDispartPageView(formName, pageCurrent, pageCount, rowCount)
- {
- var docW = "共<font color='red'>" + rowCount + "</font>记录 第" + pageCurrent + "/" + pageCount + "页 ";
- if(pageCurrent > 1) {
- docW = docW + "<a href='javascript:goPage(" + formName + ", 1)'>首页</a> ";
- docW = docW + "<a href='javascript:goPage(" + formName + ", " + (pageCurrent - 1) + ")'>上一页</a> ";
- }
- else {
- docW = docW + "首页 ";
- docW = docW + "上一页 ";
- }
- if(pageCurrent < pageCount) {
- docW = docW + "<a href='javascript:goPage(" + formName + ", " + (pageCurrent + 1) + ")'>下一页</a> ";
- docW = docW + "<a href='javascript:goPage(" + formName + ", " + pageCount + ")'>尾页</a> ";
- }
- else {
- docW = docW + "下一页 ";
- docW = docW + "尾页 ";
- }
- docW = docW + "跳转到 <input type='text' size='3' name='PAGE_gopage' class='inputtext' value=''> ";
- docW = docW + "<a href='javascript:goPage(" + formName + ", " + formName + ".PAGE_gopage.value)'>GO</a> ";
- // alert(docW);
- document.write(docW);
- }
- function drawDispartPageView1(formName, pageCurrent, pageCount, rowCount)
- {
- var docW = "共<font color='red'>" + rowCount + "</font>记录 第" + pageCurrent + "/" + pageCount + "页 ";
- if(pageCurrent > 1) {
- docW = docW + "<a href='javascript:goPage(" + formName + ", 1)'>首页</a> ";
- docW = docW + "<a href='javascript:goPage(" + formName + ", " + (pageCurrent - 1) + ")'>上一页</a> ";
- }
- else {
- docW = docW + "首页 ";
- docW = docW + "上一页 ";
- }
- if(pageCurrent < pageCount) {
- docW = docW + "<a href='javascript:goPage(" + formName + ", " + (pageCurrent + 1) + ")'>下一页</a> ";
- docW = docW + "<a href='javascript:goPage(" + formName + ", " + pageCount + ")'>尾页</a> ";
- }
- else {
- docW = docW + "下一页 ";
- docW = docW + "尾页 ";
- }
- docW = docW + "跳转到 <input type='text' size='3' name='PAGE_gopage1' class='inputtext' value=''> ";
- docW = docW + "<a href='javascript:goPage(" + formName + ", " + formName + ".PAGE_gopage1.value)'>GO</a> ";
- // alert(docW);
- document.write(docW);
- }