怎么把javascript转换成jquery???
function Page(iAbsolute,sTableId,sTBodyId)
{
this.absolute = iAbsolute; //每页最大记录数
this.tableId = sTableId;
this.tBodyId = sTBodyId;
this.rowCount = 0;//记录数
this.pageCount = 0;//页数
this.pageIndex = 0;//页索引
this.__oTable__ = null;//表格引用
this.__oTBody__ = null;//要分页内容
this.__dataRows__ = 0;//记录行引用
this.__oldTBody__ = null;
this.__init__(); //初始化;
};
/*
初始化
*/
Page.prototype.__init__ = function(){
this.__oTable__ = document.getElementById(this.tableId);//获取table引用
this.__oTBody__ = this.__oTable__.tBodies[this.tBodyId];//获取tBody引用
this.__dataRows__ = this.__oTBody__.rows;
this.rowCount = this.__dataRows__.length;
try{
this.absolute = (this.absolute <= 0) || (this.absolute>this.rowCount) ? this.rowCount : this.absolute;
this.pageCount = parseInt(this.rowCount%this.absolute == 0
? this.rowCount/this.absolute : this.rowCount/this.absolute+1);
}catch(exception){}
this.__updateTableRows__();
};
Page.prototype.GetBar=function(obj)
{
var bar= document.getElementById(obj.id);
bar.innerHTML= "每页"+this.absolute+"条/共"+this.rowCount+"条";// 第2页/共6页 首页 上一页 1 2 3 4 5 6 下一页 末页
}
/
相关问答:
C#写JAVASCRIPT 数组
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
& ......
如何实现当鼠标悬停控件上时,出现该控件的尾部显示对应的层,鼠标移动到该层上进行相应的操作,当鼠标移除时(不在控件上也不在层上)层隐藏,
http://topic.csdn.net/u/20090830/23/5e5ded07-7216-46c2-9712- ......
如题,
如数值1变成文本1,
另外文本变数值又是什么函数?
var num = 1;
var str = num + "";
var num = 1;
var str = num.toString();
数值变成文本 x = "" + x;
文 ......
看到有很多加这行代码的:
<script>
<!--//--> <![CDATA[//> <!--
这里面写函数
//--> <!]]>
</script>
不知道为什么会加这行代码 ......