日期:2014-05-18 浏览次数:20860 次
function onFirstpage(){//首页
document.form1.formAction.value="search";//列表查询的action
document.form1.currentPageNum.value="1";//首页,当前页码为1
document.form1.submit();
}
function onPrepage(){//上一页
document.form1.formAction.value="search";//列表查询的action
var i=parseInt(document.form1.currentPageNum.value);
if (i>1){
i=i-1;
}
document.form1.currentPageNum.value=String(i);
document.form1.submit();
}
function onNextpage(){//下一页
document.form1.formAction.value="search";
var i=parseInt(document.form1.currentPageNum.value);
i=i+1;
document.form1.currentPageNum.value=String(i);
document.form1.submit();
}
function onLastpage(){//尾页
document.form1.formAction.value="searchVeh";
document.form1.currentPageNum.value=document.form1.maxPageNum.value;
document.form1.submit();
}
function onPage(){//跳转页面
if(document.form1.pageNum.value == "")
{
window.alert("页数不能为空!");
return;
}
if(!isNumber(document.form1.pageNum.value, false))
{
window.alert("页数必须为数字!");
return;
}
var i = parseInt(document.form1.pageNum.value);
var max = parseInt(document.form1.maxPageNum.value);
if(i < 1 | i > max) {
window.alert("页数必须从1到" + max + "!");
return;
}
document.form1.formAction.value = "searchVeh";
document.form1.currentPageNum.value = document.form1.pageNum.value;
document.form1.submit();
}
------解决方案--------------------