一个页面,两个分页,JS写法
来源:互联网 发布:eclipse java窗体程序 编辑:程序博客网 时间:2024/04/27 18:18
function zhub_addEvent_Page(){
/**
* 在这个页面被加载的时候,把分页的请求的url放入到jquery的缓存中,把数据缓存到整个table中
//给主表的分页的首页添加一个click事件
$("input[flag='zhub_sy']").click(function(){
// $(this).attr("param") 当前页码
document.getElementById("pageNo").value = $(this).attr("param");
document.forms[0].submit();
});
$("input[flag='zhub_syy']").click(function(){
document.getElementById("pageNo").value = $(this).attr("param");
if($(this).attr("param")=="0"){
alert("已经是第一页了");
}else{
document.forms[0].submit();
}
});
$("input[flag='zhub_xyy']").click(function(){
var zhubid = $("tr[field='item_zhib']").attr("id");
document.getElementById("pageNo").value = $(this).attr("param");
//document.forms[0].action = $("#wrap").data("url")+zhubid;
document.forms[0].submit();
});
$("input[flag='zhub_wy']").click(function(){
document.getElementById("pageNo").value = $(this).attr("param");
document.forms[0].submit();
});
}
/**
* 在这个页面被加载的时候,把分页的请求的url放入到jquery的缓存中,把数据缓存到整个table中
* 一个页面上就一个table
* flag是input框自定义写法,'zhub_sy',param作用与那么作用相似,从后台获取page属性
*///给主表的分页的首页添加一个click事件
$("input[flag='zhub_sy']").click(function(){
// $(this).attr("param") 当前页码
document.getElementById("pageNo").value = $(this).attr("param");
document.forms[0].submit();
});
$("input[flag='zhub_syy']").click(function(){
document.getElementById("pageNo").value = $(this).attr("param");
if($(this).attr("param")=="0"){
alert("已经是第一页了");
}else{
document.forms[0].submit();
}
});
$("input[flag='zhub_xyy']").click(function(){
var zhubid = $("tr[field='item_zhib']").attr("id");
document.getElementById("pageNo").value = $(this).attr("param");
//document.forms[0].action = $("#wrap").data("url")+zhubid;
document.forms[0].submit();
});
$("input[flag='zhub_wy']").click(function(){
document.getElementById("pageNo").value = $(this).attr("param");
document.forms[0].submit();
});
}
0 0
- 一个页面,两个分页,JS写法
- js中两个控件实现一个功能的写法
- 页面只读JS写法
- angularJs分页js基本写法
- Laravel一个页面里有多个分页并用jQuery pagination.js实现
- Laravel一个页面里有多个分页并用jQuery pagination.js实现
- 一个页面两个窗口
- 如果一个页面中用了两个以上displaytag,需要注意的分页问题
- asp.net 一个页面放两个aspnetpager控件,同时分页时产生的问题
- hibernate的一个分页的写法
- 前台技术--页面只读JS写法
- 【js】paginnation.js 实现 页面分页
- php计算一个页面执行时间函数写法
- js弹出一个页面
- js 在一个页面两个submit 提交同一个form 到不同的action
- 分享一个分页的JS
- 一个JS分页效果代码
- 一个js的分页函数
- C++中的static关键字的总结
- 欧拉工程第12题 第一个拥有超过500个约数的三角形数是多少
- JS中的return falase及return使用方式
- 422. Valid Word Square
- Android开发资源收集
- 一个页面,两个分页,JS写法
- Linux内核--网络栈实现分析(一)--网络栈初始化
- Swift3.0创建简单的TableView
- Python爬虫实例1-抓取百度贴吧
- java接口的继承问题
- HDU 1004
- DP-POJ 1163 Triangle(简单数字三角形)
- javascript学习笔记
- java默认的无参构造方法中应该注意的问题。