日期:2014-05-16 浏览次数:20611 次
Each(this.tBody.rows, function(o){ this.Rows.push(o); }.bind(this));
this.Rows.sort(!this._order.Compare ? this.Compare.bind(this) : this._order.Compare);
var oFragment = document.createDocumentFragment(); Each(this.Rows, function(o){ oFragment.appendChild(o); });
this.tBody.appendChild(oFragment);
Compare: function(o1, o2) { var value1 = this.GetValue(o1), value2 = this.GetValue(o2); return value1 < value2 ? -1 : value1 > value2 ? 1 : 0; },
var td = tr.getElementsByTagName("td")[this._order.Index] , data = td[this._order.Attri] ? td[this._order.Attri] : td.getAttribute(this._order.Attri);
switch (this._order.DataType.toLowerCase()) { case "int": return parseInt(data) || 0; case "float": return parseFloat(data) || 0; case "date": return Date.parse(data) || 0; case "string": default: return data.toString() || ""; }
![]()
推荐阅读更多>
- javascript 中很多直接new function(){}是什么意思,该怎么处理
- JScript中没clone方法,自己写个玩clone玩玩
- Struts2-json-plugin扩充,根据业务解析JSON
- JS(去掉前前后后空格或去掉所有空格)的用法
- net.sf.json.JSONException: There is a cycle in the hierarchy
- 《牛逼的Node.js》读后感
- 生成的cookie是保存在哪儿的?小弟我在cookie文件夹中如何找不到
- 上拉框取值重复有关问题
- jQuery1.4 中逐一修改一句话中各个字的字体大小
- 如何能动态增加和删除样式?
- php变量如何传递给javascript
- ExtJs中日期的格式化处置
- nodejs跟redis安装
- struts2.1.6中关于JSON的配备和使用
- 浏览器跨域-JSONP
- highchats x轴 时间轴有关问题
- 生手问个简单的代码
- js判断浏览器(支持界别ie、firefox、opera、chrome、safari)
- Javascript高级程序设计与Javascript权威指南两书的有很多地方的结论不一样解决方法
- 哪位高手用过jqGrid?被select卡住了