/**应用脚本规则:
引用脚本: JQuery脚本和JQuery的form插件脚本
Form的ID: viewform
显示数据的div的ID: listview
分页按钮HTML属性: pageindex="1"
排序按钮HTML属性: orderfield="employeeid desc";
提效排序字段Input的ID,Name: orderfield
提交分页索引Input的ID,Name: pageindex
**/
function onInitPaging()
{
$("#listview").find("[@orderfield]").each(function(i)
{
var ordervalue = $(this).attr("orderfield");
$(this).click(function()
{
$("#orderfield").val(ordervalue);
onSubmitPage();
}
);
}
);
$("#listview").find("[@pageindex]").each(function(i)
{
var piValue = $(this).attr("pageindex");
$(this).click(function()
{
$("#pageindex").val(piValue);
onSubmitPage();
}
);
}
);
}
function onSubmitPage()
{
var options = {
success: function SubmitSuccess(data){
$("#listview").html(data);
onInitPaging();
}
};
$('#viewform').ajaxSubmit(options);
}
$(document).ready(
function()
{
$("#search").click(function(){
$("#pageindex").val('0');
onSubmitPage()
});
onSubmitPage();
}
);
<script src=jquery-latest.js></script> <script src=form.js></script> <script src=calendar.js></script> <script src=calendar-setup.js></script> <script src="lang/calendar-en.js"></script> <script src=pagination.js></script> <form id="viewform" method="post" action="FrmOrderView.aspx"> <input id="orderfield" name="orderfield" type="hidden" value="" /> <input id="pageindex" name="pageindex" type="hidden" value ="0"/> <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%"> <tr> <td valign="top" align="left"> <table width="550" cellpadding="0" cellspacing="0"> <tr> <td style="width: 63px; height: 17px; background-color: gainsboro;"> CompanyName</td> <td style="width: 114px; height: 17px;"> <input id="Text1" name="companyname" type="text" /></td> <td style="width: 63px; height: 17px; background-color: gainsboro;"> ShipCity</td> <td style="width: 126px; height: 17px;"> <input id="Text2" name="shipcity" type="text" /></td> </tr> <tr> <td style="width: 63px; height: 14px; background-color: gainsboro;"> OrderDate</td> <td style="width: 240px; height: 14px;" align="left"> <input id="Text3" name="OrderDate_Begin" type="text" /> <input id="button1" DateField="Text3" type="button" value="..." /></td> <td style="width: 63px; height: 14px; background-color: gainsboro;"> </td> <td style="width: 240px; height: 14px;" align="left"> <input id="Text4" type="text" name="OrderDate_End" /> <input id="button2" DateField="Text4" type="button" value="..." /></td> </tr> <tr> <td style="height: 50px" align="left" colspan="4"> <input id="search" type="button" value="Search" /></td> </tr> </table> </td> </tr> <tr> <td height="99%"> <div id="listview"></div> </td> </tr> </table> </form>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有