谁能帮我改改啊! <script type="text/javascript" language="javascript">
function getNum(val){
location.href="service_getServiceList4?pageNum=1&pageSize="+val;
}
function forwoard(){
var pages = document.getElementById("go").value;
window.location.href="service_getServiceList4?pageNum="+pages;
}
function getPage(val){
location.href="service_getServiceList4?pageNum="+val;
}
/* function init(val){
val=document.getElementById("go").value;
if(val>${pageMax})
return false;
}*/
</script><tr>
<th colspan="100" class="pager">
<div class="pager"> 共${count}条记录 每页
<input id="Page" value="2" size="2" onchange="getNum(this.value)" />
条 第
<input id="num" value="1" size="2" onchange="getPage(this.value)"/>
页/共
${pageMax}
页
<a href="service_getServiceList4?pageNum=1">第一页</a>
<a href="service_getServiceList4?pageNum=${pageNum>1?pageNum-1:1}">上一页</a>
<a href="service_getServiceList4?pageNum=${pageNum<pageMax?pageNum+1:pageMax }">下一页</a>
<a href="service_getServiceList4?pageNum=${pageMax}">最后一页</a> 转到
<input id="go" type="text" size="2" onselect="selected"/>
页
<button onclick="forwoard()">
GO
</button>
</div>
</th>
</tr>
function getNum(val){
location.href="service_getServiceList4?pageNum=1&pageSize="+val;
}
function forwoard(){
var pages = document.getElementById("go").value;
window.location.href="service_getServiceList4?pageNum="+pages;
}
function getPage(val){
location.href="service_getServiceList4?pageNum="+val;
}
/* function init(val){
val=document.getElementById("go").value;
if(val>${pageMax})
return false;
}*/
</script><tr>
<th colspan="100" class="pager">
<div class="pager"> 共${count}条记录 每页
<input id="Page" value="2" size="2" onchange="getNum(this.value)" />
条 第
<input id="num" value="1" size="2" onchange="getPage(this.value)"/>
页/共
${pageMax}
页
<a href="service_getServiceList4?pageNum=1">第一页</a>
<a href="service_getServiceList4?pageNum=${pageNum>1?pageNum-1:1}">上一页</a>
<a href="service_getServiceList4?pageNum=${pageNum<pageMax?pageNum+1:pageMax }">下一页</a>
<a href="service_getServiceList4?pageNum=${pageMax}">最后一页</a> 转到
<input id="go" type="text" size="2" onselect="selected"/>
页
<button onclick="forwoard()">
GO
</button>
</div>
</th>
</tr>
解决方案 »
- 关于dom4j新版本1.6.1的问题
- daemon
- 急!struts+hibernate错误 javax.servlet.ServletException
- 初涉JSP遇到问题:文本框不能为空的JAVASCRIPT脚本怎么写啊?请教大家。
- 关于awt-----------------按钮布局??
- 如何在表中增加一个字段?(100分送上!!!急.......)
- DAO模式和简单工厂模式
- 使用JBOSS的一个故障
- 请问怎么把HTML改成XML??(XML菜菜鸟)
- jb2005 利用ProcedureDataSet组件调用oracle9i的过程搞不定??
- Windows2003 下的java软件权限问题
- java查询数据库中文乱码
function forwoard(){
var pages = document.getElementById("go").value;
window.location.href="service_getServiceList4?pageNum="+pages;
}
不说别的,先帮你看下这个方法,你转到下一页确不把当前的每页大小带过去,这样肯定就乱了,要是用户开始更改了每页的大小,一点,又回到原样了