function goToURL() { // v3.0 var i, args = goToURL.arguments; document.location = args[0]; } function toQuery() { toFirst(); } function toFirst() { var pageSize = document.getElementById("pageSize").value; var curPage = document.getElementById("curPageNum"); curPage.value = 1; // document.pageForm.action = // document.getElementById("searchFormName").value; document.pageForm.submit(); return true; } function toPre() { var pageSize = document.getElementById("pageSize").value; var curPage = document.getElementById("curPageNum"); var curPageNum = document.getElementById("curPageNum").value; var curPage = document.getElementById("curPageNum"); if (curPage.value > 1) { curPage.value = curPageNum - 1; } // document.pageForm.action = // document.getElementById("searchFormName").value; document.pageForm.submit(); } function toNext() { var pageSize = document.getElementById("pageSize").value; var curPage = document.getElementById("curPageNum"); var curPageNum = document.getElementById("curPageNum").value; var totalPageNum = document.getElementById("totalPageNum").value; if (curPageNum < new Number(totalPageNum)) { document.getElementById("curPageNum").value = new Number(curPageNum) + 1; } // alert("1"); // alert(document.getElementById("url").value+"?pageSize="+pageSize+"&curPageNum="+curPage.value); // document.pageForm.action = // document.getElementById("searchFormName").value; document.pageForm.submit(); } function toLast() { var pageSize = document.getElementById("pageSize").value; var curPage = document.getElementById("curPageNum"); var totalPageNum = document.getElementById("totalPageNum").value; document.getElementById("curPageNum").value = totalPageNum; // document.pageForm.action = // document.getElementById("searchFormName").value; document.pageForm.submit(); } function toGo() { // alert("pager.go"); var totalPageNum = document.getElementById("totalPageNum").value; var goPageNum = document.getElementById("toPageNum"); var goPageNumValue = goPageNum.value; var pageSize = document.getElementById("pageSize").value; var curPage = document.getElementById("curPageNum"); alert(document.getElementById("j_productType").value); if (goPageNumValue > 0 && goPageNumValue <= new Number(totalPageNum)) { document.getElementById("curPageNum").value = document .getElementById("toPageNum").value; } else { goPageNum.value = document.getElementById("curPageNum").value; alert("��������Чҳ��!"); return false; } // document.pageForm.action = // document.getElementById("searchFormName").value; document.pageForm.submit(); } function setParam() { var args = setParam.arguments; // alert(args[0]); // alert(document[args[0]].action); // document.userListForm.action=document.userListForm.action+"?topage="+args[0]; document[args[0]].action = document[args[0]].action + "?topage=" + args[1]; return true; } function setClass(eleName, clsName) { document.all(eleName).className = clsName; } /* * function swapArrow(){ var cur = parseInt(document.all('currPage').value); var * total = parseInt(document.all('totalPage').value); * * var objSpanFirst = document.all('first'); var objSpanPrev = * document.all('pre'); var objSpanNext = document.all('next'); var objSpanLast = * document.all('last'); * * if(total==1)//ȫ�������� { //ȫ�������� objSpanFirst.className='ArrowFirstGray * ArrowCommon'; objSpanPrev.className ='ArrowPrevGray ArrowCommon'; * objSpanNext.className ='ArrowNextGray ArrowCommon'; objSpanLast.className * ='ArrowLastGray ArrowCommon'; } if(total>1 && cur==1) { //ǰ��ҳ������ * objSpanFirst.className='ArrowFirstGray ArrowCommon'; objSpanPrev.className * ='ArrowPrevGray ArrowCommon'; objSpanNext.className ='ArrowNextLite * ArrowCommon'; objSpanLast.className ='ArrowLastLite ArrowCommon'; } * if(total>1 && cur>1 && cur1 && cur==total) { //��ҳ������ * objSpanFirst.className='ArrowFirstLite ArrowCommon'; objSpanPrev.className * ='ArrowPrevLite ArrowCommon'; objSpanNext.className ='ArrowNextGray * ArrowCommon'; objSpanLast.className ='ArrowLastGray ArrowCommon'; } } */ function KeyIsNumber(KeyCode) { // ���������ַ�����0-9֮�䣬������backspace��DEL�� if (((KeyCode > 47) && (KeyCode < 58)) || (KeyCode == 8) || (KeyCode == 46)) { return true; } else { return false; } } function invalidateKey() { var keyCode = event.keyCode; if (keyCode == 13) { event.returnValue = false; // document.getElementById(event.srcElement.id).focus(); } if (!KeyIsNumber(keyCode)) { return false; } }