日期:2014-05-16 浏览次数:20625 次
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() || ""; }
![]()
推荐阅读更多>
- 求正则婚配字符串中只出现过一次的字符
- AS3跟JS互相调用的小技巧 【一】
- jquery如何捕捉窗口关闭事件,如何做带标题的border
- 一个js容易模拟Map结构
- Java乔晓松-ajax开发框架跟XMLhttpRequest、responseText、responseXml和JSON的应用
- JSTL总结
- jquery 获取js输出的数据的值,该怎么解决
- location.href=d.g('a').value;不兼容IE.该如何解决
- JavaScript 关于数据的正则表达 急解决思路
- 延时显示的有关问题
- jstrss式样
- !小弟我的jsp页面不能重复执行
- 小数点移动有关问题
- 典型的javascript兼容有关问题
- JSI容易介绍
- 键盘下上,左右切换效果
- js foreach的有关问题
- 扩张JavaScript的String对象方法
- ExtJs简略表格
- 能否在利用函数创建一个<p>元素时赋予id和onclick属性