不會封裝,湊合用了
//總條數,單頁條數,翻頁ajax
function createlinks(total, pagesize, callback)
else
var _pagecount = getpagecount(total, pagesize);//取得總頁數
if (_pagecount == 0 || _pagecount==1)
var start = 1, end = _pagecount, isstart = false,isend=false;
if (_pagecount <= 10)
else if ((_pagecount - page_index) <= 5)
else
else
}var links = "";
if (isstart)
}for (var i = start; i <= end; i++)
if (i == page_index)
else
}if (isend)
}//前一頁
if (page_index == 1)
else
//後一頁
if (page_index == _pagecount)
else
//第一頁
if (page_index == 1)
else
//最後一頁
if (page_index == _pagecount)
else
links = "";
$("#pagination").empty().html(links);
$("#pagination ul li a").click(function ()
})}/**
* 獲取總頁碼
* @param total
* @param pagesize
*/function getpagecount(total, pagesize)
/**
* 獲取url+#引數改寫改寫
*//*
a:引數
b:引數值
*/function writeurl(a, b)
else if (_url.indexof(a) == -1)
else
else
}d = d.substring(0, d.length - 1);
window.location.hash = "#" + d;
}}/*獲取url+#引數改寫結束*/
function readurl(a)
}return d;
}return "";
}/**
* 刪除#引數
* @param a
*/function delurl(a)
}d = d.substring(0, d.length - 1);
window.location.hash = "#" + d;
}}
//資料提取.js
var pageindex = 1, pagesize = 16, pagecount = 1;
var d_list = , filter_list = ;
function databind() ,
success: function (data)
})}search = function () )}})
pagecall();
};pagecall = function ()
pageindex = pageindex < 1 ? 0 : pageindex;
var pstart = (pageindex - 1) * pagesize;
var pover = pageindex * pagesize;
pover = pover > filter_list.length ? filter_list.length : pover;
$("span[data-count-id='count']").html(filter_list.length);
var html = "";
for (var i = pstart; i < pover; i++)
$("tbody[data-list-id='list']").html(html);
createlinks(filter_list.length, pagesize, pagecall);
};$(".card-search input,.card-search select").on("input propertychange", function () );
css
.table_pagination
.table_pagination .new_pagination li, .table_pagination .pagination span, .table_pagination .pagination a
.table_pagination .new_pagination li a, .table_pagination .pagination span, .table_pagination .pagination a
.table_pagination .new_pagination li a:hover, .table_pagination .pagination span:hover, .table_pagination .pagination a:hover
.table_pagination .new_pagination li.active a, .table_pagination .pagination span.current
.table_pagination .new_pagination li a[disabled], .table_pagination .pagination span[rel="prev"], .table_pagination .pagination span[rel="next"]
對接資料前的準備(採用的是jquery的方式開發)
1.0 設定頁面資料 var pagedata 2.0實現切換效果 獲取分類狀態 catetab function catetab 3.0 獲取資料 function getlists sta if res else 4.0 渲染器列表 function renderlist data 5.0 載入...
何時採用SOA,何時不採用SOA
不可輕易決定實現soa。這與改變生活方式有些類似,因為開發和操作團隊遵循的 it 控制模式將完全不同。holt adams soa 能夠優化業務需求與 it 的一致性,能夠將業務流程活動從服務實現中分離出來,還能夠降低操作成本。只有在不固定 商的情況下才能真正實現這些功能,此時面向 soa 實現的技...
CAS採用http方式不採用https方式配置
cas3一下的版本網上介紹說比較複雜,本人未測試。本文是在cas server3.4版本上測試成功的,記錄在此以供以後查詢 主要有以下步驟 1.web inf spring configuration ticketgrantingticketcookiegenerator.xml中將p cookie...