JS分页出问题,求帮助
<script type="text/javascript" src="/Images/jquery.js"></script>
<script type="text/javascript">
function TablePage(id,size,Top){
var Prevv = 'Prev' + Top ;
var Nextt = 'Next' + Top ;
var $table = $(id);
var currentPage = 0; //当前页
var pageSize = size; //每页行数(不包括表头)
$table.bind("repaginate", function()
{
//console.log($table.find("tbody tr").eq(0));
$table.find("tbody tr").hide().slice(currentPage * pageSize, (currentPage + 1) * pageSize).show();
// $table.find("tbody tr").eq(0).show();
});
var numRows = $table.find("tbody tr").length; //记录宗条数
var numPages = Math.ceil(numRows/pageSize); //总页数
//console.log(numPages);
var $pager = $("<div class='page'><a href='javascript:void(0)'><span id='"+ Prevv +"' style='margin-right:4px;'>上一页</span></a></div>"); //分页div
for( var page = 0; page < numPages; page++ )
{
//为分页标签加上链接
//if(page==0){$("<a href='javascript:void(0)'><span id='1' class="click_page"></span></a>")}
$("<a href='javascript:void(0)'><span id='"+ (page+1)+"'>"+ (page+1) +"</span></a>")
.bind("click", { "newPage": page }, function(event){
currentPage = event.data["newPage"];
//console.log($(this).children("span"));
$(this).children("span").attr("class","click_page");
$(this).children("span").css({"color":"#FFFFFF"});
$(".page a span").not($(this).children("span")).attr("class","");
$(".page a span").not($(this).children("span")).css({"color":"#1155BB"});
$table.trigger("repaginate");
})
.appendTo($pager);
$pager.append(" ");
}
//$table.trigger("repaginate");
var next=$("<a href='javascript:void(0)'><span id='"+ Nextt +"'>下一页</span></a>");
&nb