footHtml += "<span id='firstPage'>首页</span>";
footHtml += "<span id='UpPage'>上一页</span>";
footHtml += "<span id='nextPage'>下一页</span>";
footHtml += "<span id='lastPage'>末页</span>";
footHtml += "<input type='text'/><span id='skippage'>跳转</span>";
footHtml += "</td></tr>";
$("table[id='" + this._id + "'] tfoot").append(footHtml);
$("table[id='" + this._id + "'] tfoot tr td").attr("colspan", "5");
},
//添加鼠标悬浮事件
registermousehover: function () {
//添加鼠标悬浮事件
$("table[id='" + this._id + "'] tbody tr").mouseover(function () {
$(this).addClass("mouseover");
}).mouseleave(function () {
$(this).removeClass("mouseover");
});
},
//添加隔行变色事件
registerchangebgcolor: function () {
//添加隔行变色
if (this.settings.isoddcolor) $("table[id='" + this._id + "'] tr:odd").css("background-color", "#A77C7B").css("color", "#fff");
},
//添加全选全不选事件
registercheckall: function () {
//添加全选全不选事件
$("input[name='chkall']").click(function () {
if (this.checked) {
$("input[name='chk']").each(function () {
$(this).attr("checked", true);
});
} else {
$("input[name='chk']").each(function () {
$(this).attr("checked", false);
});
}
});
},
//添加首页事件
registerFirstPage: function () {
$("#firstPage").click(function(){
_op.settings.pageindex = 1;
_op.createTableBody( _op.settings.pageindex);
});
},
//添加上一页事件
registerUpPage: function () {
$("table").delegate("#UpPage", "click",
function () {
if ( _op.settings.pageindex == 1) {
alert("已经是第一页了");
return;
}
_op.settings.pageindex = _op.settings.pageindex - 1;
_op.createTableBody(_op.settings.pageindex);
});
},
//添加下一页事件
registerNextPage: function () {
$("table").delegate("#nextPage", "click",
function () {
if (_op.settings.pageindex == _op.settings.totalpage) {
alert("已经是最后一页了");
return;
}
_op.settings.pageindex = _op.settings.pageindex + 1;
_op.createTableBody(_op.settings.pageindex);
});
},
//添加尾页事件
registerlastPage: function () {
$("table").delegate("#lastPage", "click",
function () {
_op.settings.pageindex = _op.settings.totalpage;
_op.createTableBody( _op.settings.totalpage);
});
},
//添加页数跳转事件
registerSkipPage: function () {
$("table").delegate("#skippage", "click",
function () {










