摘要:
1】冒泡法排列//Implementing a simple bubble sort:Array.prototype.sort = function () { var tmp; for(var i=0;i<this.length;i++) { for(var j=0;j<this.length;j++) { if(this[i]<this[j]) { tmp = this[i]; this[i] = this[j]; this[j] = tmp; } } } }2】根据一个属性进行排列//Implementing a simple sort by pr... 阅读全文
posted @ 2012-02-28 17:27
鱼不爱水
阅读(378)
评论(0)
推荐(0)
浙公网安备 33010602011771号